-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainBrowserDlg.hpp
65 lines (50 loc) · 1.73 KB
/
MainBrowserDlg.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once
#include "resource.h"
#include "DlgResizeHelper.h"
#include "BrowserHostDlg.hpp"
// Forward declaration
class CBrowserPopupDlg;
class JSHook;
// The main drip dialog box, containing the browser control.
//
class CMainBrowserDlg : public CBrowserHostDlg {
private:
wchar_t* getUrlText();
void go();
CComObject<JSHook>* m_hook;
std::vector<CBrowserPopupDlg*> m_popups;
bool m_waitingForDoc;
bool m_waitingForBlankDoc;
bool m_autoRefreshMode;
MSHTML::IHTMLDocument2Ptr m_checkLeakDoc;
HICON m_hIcon;
DlgResizeHelper m_resizeHelper;
virtual CComObject<JSHook>* getHook() { return m_hook; }
virtual bool isHookActive() { return m_waitingForDoc && !m_autoRefreshMode; }
public:
enum { IDD = IDD_BROWSER_DIALOG };
CMainBrowserDlg(CWnd* pParent = NULL);
virtual ~CMainBrowserDlg();
DECLARE_MESSAGE_MAP()
LRESULT WindowProc(UINT message, WPARAM wparam, LPARAM lparam);
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void doNothing();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
afx_msg void OnClose();
afx_msg void OnDestroy();
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnBnClickedGo();
afx_msg void OnBnClickedBack();
afx_msg void OnBnClickedForward();
afx_msg void OnBnClickedCheckLeaks();
afx_msg void OnBnClickedAutoRefresh();
void requestClosePopups();
void destroyFinishedPopups();
virtual void onTitleChange(LPCTSTR lpszText);
virtual void onOuterDocumentLoad(MSHTML::IHTMLDocument2Ptr doc);
virtual void onNewWindow(CBrowserHostDlg** ppDlg);
};