00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "FdmApp.h"
00008 #include "Dlg_Opinions.h"
00009 #include "vmsMaliciousDownloadChecker.h"
00010
00011 #ifdef _DEBUG
00012 #define new DEBUG_NEW
00013 #undef THIS_FILE
00014 static char THIS_FILE[] = __FILE__;
00015 #endif
00016
00017 CDlg_Opinions::CDlg_Opinions(CWnd* pParent )
00018 : CDialog(CDlg_Opinions::IDD, pParent)
00019 {
00020 m_pszUrl = NULL;
00021 }
00022
00023 void CDlg_Opinions::DoDataExchange(CDataExchange* pDX)
00024 {
00025 CDialog::DoDataExchange(pDX);
00026
00027 DDX_Control(pDX, IDC_EXPLORER1, m_wndWB);
00028
00029 }
00030
00031 BEGIN_MESSAGE_MAP(CDlg_Opinions, CDialog)
00032
00033 ON_BN_CLICKED(IDC_ABORT, OnAbort)
00034
00035 END_MESSAGE_MAP()
00036
00037 BOOL CDlg_Opinions::OnInitDialog()
00038 {
00039 CDialog::OnInitDialog();
00040
00041 ASSERT (m_pszUrl != NULL);
00042
00043 SetDlgItemText (IDC_ABORT, LS (L_DONTDOWNLOADTHIS));
00044 SetDlgItemText (IDCANCEL, LS (L_CLOSE));
00045
00046 m_wbEvents.set_WebBrowser (&m_wndWB);
00047 m_wbEvents.set_UIHandler (&m_UIHandler);
00048 m_wbEvents.Attach ();
00049
00050 CString str;
00051 str.Format ("http://fdm.freedownloadmanager.org/fromfdm/showopinions.html?url=%s",
00052 vmsMaliciousDownloadChecker::EncodeUrl (m_pszUrl));
00053 CString strLoading;
00054 strLoading.Format ("about:%s...", LS (L_LOADING));
00055
00056 m_wndWB.Navigate (strLoading, 0, 0, 0, 0);
00057 m_wndWB.Navigate (str, NULL, NULL, NULL, NULL);
00058
00059 SetWindowText (LS (L_OPINIONS));
00060
00061 return TRUE;
00062 }
00063
00064 void CDlg_Opinions::OnAbort()
00065 {
00066 EndDialog (IDC_ABORT);
00067 }