📄 dialog.h
字号:
#ifndef _GOS_DIALOG_H_
#define _GOS_DIALOG_H_
enum _tagDialog
{
WS_TITLED =0x0001L,
WS_MINIMIZEBOX =0x0002L,
WS_MAXIMIZEBOX =0x0003L,
WS_MAXIMIZE =0x0010L,
WS_MINIMIZE =0x0020L,
WM_CREATEDIALOG=WM_CTLBASE2+1,
WM_INITDIALOG,
IDC_STATIC=0,
IDOK=1,
IDCANCEL,
IDABORT,
IDRETRY,
IDIGNORE,
IDYES,
IDNO,
};
class CDialog : public CPWnd
{
public:
int DoModal();
CFont* GetFont(CWnd* pWnd)
{ return (CFont*)MsgProc(WM_GETFONT,WPARAM(pWnd),0); }
void SetNormalRect(LPCRECT pRect){m_rclNormal=pRect;}
const CRect& GetNormalRect(){return m_rclNormal;}
void GetNormalRect(LPRECT pRect){*pRect=m_rclNormal;}
public:
virtual LRESULT MsgProc(UINT message, WPARAM wParam, LPARAM lParam);
void OnDestroy();
void OnCreateDialog();
void OnCreate();
void OnClose(){PostMessage(WM_QUIT,IDOK,-1);}
CFont* OnGetFont(CWnd* pWnd);
void OnOK(){PostMessage(WM_QUIT,IDOK,0);}
void OnCancel(){PostMessage(WM_QUIT,IDCANCEL,0);}
private:
CRect m_rclNormal;
};
typedef CDialog* PDIALOG;
#endif //_GOS_DIALOG_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -