dialog.h
来自「使非MFC窗口程序的窗口回调过程成为C++类的成员函数。」· C头文件 代码 · 共 37 行
H
37 行
#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 + =
减小字号Ctrl + -
显示快捷键?