www.pudn.com > WinGOS.rar > 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_