OSDN Git Service

Pimped TortoiseGit logo up a bit
[tortoisegit/TortoiseGitJp.git] / ext / ResizableLib / ResizableFormView.h
1 #if !defined(AFX_RESIZABLEFORMVIEW_H__INCLUDED_)\r
2 #define AFX_RESIZABLEFORMVIEW_H__INCLUDED_\r
3 \r
4 #if _MSC_VER > 1000\r
5 #pragma once\r
6 #endif // _MSC_VER > 1000\r
7 \r
8 // ResizableFormView.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 \r
31 /////////////////////////////////////////////////////////////////////////////\r
32 // CResizableFormView form view\r
33 \r
34 #include <afxext.h>\r
35 \r
36 class CResizableFormView : public CFormView, public CResizableLayout,\r
37                                                  public CResizableGrip, public CResizableMinMax\r
38 {\r
39         DECLARE_DYNAMIC(CResizableFormView)\r
40 \r
41 // Construction\r
42 protected:      // must derive your own class\r
43         CResizableFormView(UINT nIDTemplate);\r
44         CResizableFormView(LPCTSTR lpszTemplateName);\r
45         virtual ~CResizableFormView();\r
46 \r
47 private:\r
48         void PrivateConstruct();\r
49         \r
50         // support for temporarily hiding the grip\r
51         DWORD m_dwGripTempState;\r
52         enum GripHideReason             // bitmask\r
53         {\r
54                 GHR_MAXIMIZED = 0x01,\r
55                 GHR_SCROLLBAR = 0x02,\r
56                 GHR_ALIGNMENT = 0x04,\r
57         };\r
58 \r
59 // called from base class\r
60 protected:\r
61 \r
62         virtual void GetTotalClientRect(LPRECT lpRect) const;\r
63 \r
64         virtual CWnd* GetResizableWnd() const\r
65         {\r
66                 // make the layout know its parent window\r
67                 return CWnd::FromHandle(m_hWnd);\r
68         };\r
69 \r
70 \r
71 // Attributes\r
72 public:\r
73 \r
74 // Operations\r
75 public:\r
76 \r
77 // Overrides\r
78 public:\r
79         // ClassWizard generated virtual function overrides\r
80         //{{AFX_VIRTUAL(CResizableFormView)\r
81         protected:\r
82         virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);\r
83         //}}AFX_VIRTUAL\r
84 \r
85 // Implementation\r
86 protected:\r
87 \r
88 #ifdef _DEBUG\r
89         virtual void AssertValid() const;\r
90         virtual void Dump(CDumpContext& dc) const;\r
91 #endif\r
92 \r
93         // Generated message map functions\r
94         //{{AFX_MSG(CResizableFormView)\r
95         afx_msg void OnSize(UINT nType, int cx, int cy);\r
96         afx_msg BOOL OnEraseBkgnd(CDC* pDC);\r
97         afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);\r
98         afx_msg void OnDestroy();\r
99         virtual BOOL OnInitDialog();\r
100         afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);\r
101         //}}AFX_MSG\r
102         DECLARE_MESSAGE_MAP()\r
103 };\r
104 \r
105 /////////////////////////////////////////////////////////////////////////////\r
106 \r
107 //{{AFX_INSERT_LOCATION}}\r
108 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
109 \r
110 #endif // !defined(AFX_RESIZABLEFORMVIEW_H__INCLUDED_)\r