forked from hiyohiyo/CrystalDiskInfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DHtmlDialogEx.h
85 lines (67 loc) · 2.57 KB
/
DHtmlDialogEx.h
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*---------------------------------------------------------------------------*/
// Author : hiyohiyo
// Mail : [email protected]
// Web : https://crystalmark.info/
// License : The MIT License
/*---------------------------------------------------------------------------*/
#pragma once
class CDHtmlDialogEx : public CDHtmlDialog
{
public:
CDHtmlDialogEx(UINT dlgResouce, UINT dlgHtml, CWnd* pParent = NULL);
virtual ~CDHtmlDialogEx();
void InitDialogEx(DWORD sizeX, DWORD sizeY, CString dlgPath);
void SetClientRect(DWORD sizeX, DWORD sizeY, DWORD menuLine = 0);
void ShowWindowEx(int nCmdShow);
virtual BOOL Create(UINT nIDTemplate, CWnd* dlgWnd, UINT menuId, CWnd* pParentWnd = NULL);
CString m_CurrentLangPath;
CString m_DefaultLangPath;
enum ZOOM_TYPE
{
ZoomTypeAuto = 0,
ZoomType100 = 100,
ZoomType125 = 125,
ZoomType150 = 150,
ZoomType200 = 200,
};
afx_msg void OnTimer(UINT_PTR nIDEvent);
static const int TIMER_INIT_DHTML_DIALOG = 0x1000;
protected:
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
virtual void OnOK();
virtual void OnCancel();
HACCEL m_hAccelerator;
BOOL m_bShowWindow;
BOOL m_bModelessDlg;
CWnd* m_ParentWnd;
CWnd* m_DlgWnd;
UINT m_MenuId;
TCHAR m_Ini[MAX_PATH];
double m_ZoomRatio;
DWORD m_ZoomType;
void SetClassName(LPCTSTR szElementId, CString className);
void SetTitle(LPCTSTR szElementId, CString title);
void SetElementPropertyEx(LPCTSTR szElementId, DISPID dispid, CString className);
void SetElementOuterHtmlEx(LPCTSTR szElementId, CString outerHtml);
void SetElementInnerHtmlEx(LPCTSTR szElementId, CString innerHtml);
INT CallScript(CString funcition, CString argument);
void EnableDpiAware();
DWORD ChangeZoomType(DWORD zoomType);
double GetZoomRatio();
CString i18n(CString section, CString key, BOOL inEnglish = FALSE);
void SetLabel(CString &label, CString element, CString title);
void OpenUrl(CString url);
BOOL ClickCheck();
BOOL IsLoadHtmlCompleted();
void HideControl(int nIDDlgItem);
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR szUrl);
virtual void PostNcDestroy();
virtual BOOL OnAmbientProperty(COleControlSite* pSite, DISPID dispid, VARIANT* pvar);
virtual STDMETHODIMP GetOptionKeyPath(LPOLESTR *pchKey, DWORD dw);
virtual STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
virtual void InitDialogComplete();
DECLARE_MESSAGE_MAP()
DECLARE_DHTML_EVENT_MAP()
};