00001 #if !defined(AFX_RESIZABLEDIALOG_H__INCLUDED_)
00002 #define AFX_RESIZABLEDIALOG_H__INCLUDED_
00003
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007
00008
00009
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00023
00024 #include "ResizableLayout.h"
00025 #include "ResizableGrip.h"
00026 #include "ResizableMinMax.h"
00027 #include "ResizableState.h"
00028 #include "..\CmdUI\CmdUI.h"
00029
00031
00032
00033 class CResizableDialog : public CCmdUIDialog, public CResizableLayout,
00034 public CResizableGrip, public CResizableMinMax,
00035 public CResizableState
00036 {
00037
00038
00039 public:
00040 CResizableDialog();
00041 CResizableDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
00042 CResizableDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
00043
00044
00045 private:
00046
00047 DWORD m_dwGripTempState;
00048
00049
00050 BOOL m_bEnableSaveRestore;
00051 BOOL m_bRectOnly;
00052
00053
00054 CString m_sSection;
00055
00056
00057 public:
00058
00059
00060
00061
00062 protected:
00063
00064
00065
00066 public:
00067 virtual ~CResizableDialog();
00068
00069
00070 private:
00071 void PrivateConstruct();
00072
00073
00074 protected:
00075
00076 void EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE);
00077
00078 virtual CWnd* GetResizableWnd()
00079 {
00080
00081 return this;
00082 };
00083
00084
00085 protected:
00086
00087 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
00088 afx_msg void OnSize(UINT nType, int cx, int cy);
00089 afx_msg void OnDestroy();
00090 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00091 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00092
00093 DECLARE_MESSAGE_MAP()
00094 };
00095
00097
00098
00099
00100
00101 #endif // !defined(AFX_RESIZABLEDIALOG_H__INCLUDED_)