OSDN Git Service

Linked with static version of CRT/MFC.
[tortoisegit/TortoiseGitJp.git] / ext / ResizableLib / ResizableDialog.h
1 #if !defined(AFX_RESIZABLEDIALOG_H__INCLUDED_)\r
2 #define AFX_RESIZABLEDIALOG_H__INCLUDED_\r
3 \r
4 #if _MSC_VER > 1000\r
5 #pragma once\r
6 #endif // _MSC_VER > 1000\r
7 \r
8 // ResizableDialog.h : header file\r
9 //\r
10 /////////////////////////////////////////////////////////////////////////////\r
11 //\r
12 // This file is part of ResizableLib\r
13 // http://sourceforge.net/projects/resizablelib\r
14 //\r
15 // Copyright (C) 2000-2004 by Paolo Messina\r
16 // http://www.geocities.com/ppescher - mailto:ppescher@hotmail.com\r
17 //\r
18 // The contents of this file are subject to the Artistic License (the "License").\r
19 // You may not use this file except in compliance with the License. \r
20 // You may obtain a copy of the License at:\r
21 // http://www.opensource.org/licenses/artistic-license.html\r
22 //\r
23 // If you find this code useful, credits would be nice!\r
24 //\r
25 /////////////////////////////////////////////////////////////////////////////\r
26 \r
27 #include "ResizableLayout.h"\r
28 #include "ResizableGrip.h"\r
29 #include "ResizableMinMax.h"\r
30 #include "ResizableWndState.h"\r
31 \r
32 /////////////////////////////////////////////////////////////////////////////\r
33 // CResizableDialog window\r
34 \r
35 class CResizableDialog : public CDialog, public CResizableLayout,\r
36                                                  public CResizableGrip, public CResizableMinMax,\r
37                                                  public CResizableWndState\r
38 {\r
39 \r
40 // Construction\r
41 public:\r
42         CResizableDialog();\r
43         CResizableDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);\r
44         CResizableDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);\r
45 \r
46 // Attributes\r
47 private:\r
48         // support for temporarily hiding the grip\r
49         DWORD m_dwGripTempState;\r
50 \r
51         // flags\r
52         BOOL m_bEnableSaveRestore;\r
53         BOOL m_bRectOnly;\r
54 \r
55         // internal status\r
56         CString m_sSection;                     // section name (identifies a parent window)\r
57 \r
58 // Operations\r
59 public:\r
60 \r
61 // Overrides\r
62         // ClassWizard generated virtual function overrides\r
63         //{{AFX_VIRTUAL(CResizableDialog)\r
64         protected:\r
65         virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);\r
66         //}}AFX_VIRTUAL\r
67 \r
68 // Implementation\r
69 public:\r
70         virtual ~CResizableDialog();\r
71 \r
72 // used internally\r
73 private:\r
74         void PrivateConstruct();\r
75 \r
76 // callable from derived classes\r
77 protected:\r
78         // section to use in app's profile\r
79         void EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE);\r
80 \r
81         virtual CWnd* GetResizableWnd() const\r
82         {\r
83                 // make the layout know its parent window\r
84                 return CWnd::FromHandle(m_hWnd);\r
85         };\r
86 \r
87 // Generated message map functions\r
88 protected:\r
89         //{{AFX_MSG(CResizableDialog)\r
90         afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);\r
91         afx_msg void OnSize(UINT nType, int cx, int cy);\r
92         afx_msg void OnDestroy();\r
93         afx_msg BOOL OnEraseBkgnd(CDC* pDC);\r
94         afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);\r
95         //}}AFX_MSG\r
96         DECLARE_MESSAGE_MAP()\r
97 };\r
98 \r
99 /////////////////////////////////////////////////////////////////////////////\r
100 \r
101 //{{AFX_INSERT_LOCATION}}\r
102 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
103 \r
104 #endif // !defined(AFX_RESIZABLEDIALOG_H__INCLUDED_)\r