📄 dialog.h
字号:
#ifndef __DIALOG_H__
#define __DIALOG_H__
// base for all dialog
class CDialog : public CWndProc
{
public:
//constructor and destructor
CDialog();
virtual ~CDialog();
//functions
int DoModal(HWND hParent = NULL);
bool CenterDlg();
void SetTitle(LPCTSTR lpszTitle);
HICON SetIcon(HICON hIcon, bool bBigIcon);
protected:
virtual void SetTemplateID() = 0;
//dialog procedure.
virtual LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
//message
virtual bool OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
virtual void OnSetFont(HWND hwndCtl, HFONT hfont, BOOL fRedraw);
virtual void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
virtual void OnCancel(HWND hwnd, HWND, UINT);
virtual void OnOK(HWND hwnd, HWND, UINT);
//member
HWND m_hWnd;
UINT m_uIDTemplate;
};
#endif //__DIALOG_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -