OSDN Git Service

Show Ignore Sub Menu
[tortoisegit/TortoiseGitJp.git] / Utils / TreePropSheet / PropPageFrameDefault.h
1 /********************************************************************\r
2 *\r
3 * Copyright (c) 2002 Sven Wiegand <mail@sven-wiegand.de>\r
4 *\r
5 * You can use this and modify this in any way you want,\r
6 * BUT LEAVE THIS HEADER INTACT.\r
7 *\r
8 * Redistribution is appreciated.\r
9 *\r
10 * $Workfile:$\r
11 * $Revision:$\r
12 * $Modtime:$\r
13 * $Author:$\r
14 *\r
15 * Revision History:\r
16 *       $History:$\r
17 *\r
18 *********************************************************************/\r
19 \r
20 \r
21 #if !defined(AFX_PROPPAGEFRAMEDEFAULT_H__5C5B7AC9_2DF5_4E8C_8F5E_DE2CC04BBED7__INCLUDED_)\r
22 #define AFX_PROPPAGEFRAMEDEFAULT_H__5C5B7AC9_2DF5_4E8C_8F5E_DE2CC04BBED7__INCLUDED_\r
23 \r
24 #if _MSC_VER > 1000\r
25 #pragma once\r
26 #endif // _MSC_VER > 1000\r
27 \r
28 #include "PropPageFrame.h"\r
29 \r
30 \r
31 namespace TreePropSheet\r
32 {\r
33 \r
34 \r
35 /**\r
36 An implementation of CPropPageFrame, that works well for Windows XP\r
37 styled systems and older windows versions (without themes).\r
38 \r
39 @author Sven Wiegand\r
40 */\r
41 class /*AFX_EXT_CLASS*/ CPropPageFrameDefault : public CWnd,\r
42                                             public CPropPageFrame\r
43 {\r
44 // construction/destruction\r
45 public:\r
46         CPropPageFrameDefault();\r
47         virtual ~CPropPageFrameDefault();\r
48 \r
49 // operations\r
50 public:\r
51 \r
52 // overridings\r
53 public:\r
54         virtual BOOL Create(DWORD dwWindowStyle, const RECT &rect, CWnd *pwndParent, UINT nID);\r
55         virtual CWnd* GetWnd();\r
56         virtual void SetCaption(LPCTSTR lpszCaption, HICON hIcon = NULL);\r
57         \r
58 protected:\r
59         virtual CRect CalcMsgArea();\r
60         virtual CRect CalcCaptionArea();\r
61         virtual void DrawCaption(CDC *pDc, CRect rect, LPCTSTR lpszCaption, HICON hIcon);\r
62 \r
63 // Implementation helpers\r
64 protected:\r
65         /**\r
66         Fills a rectangular area with a gradient color starting at the left\r
67         side with the color clrLeft and ending at the right sight with the\r
68         color clrRight.\r
69 \r
70         @param pDc\r
71                 Device context to draw the rectangle in.\r
72         @param rect\r
73                 Rectangular area to fill.\r
74         @param clrLeft\r
75                 Color on the left side.\r
76         @param clrRight\r
77                 Color on the right side.\r
78         */\r
79         void FillGradientRectH(CDC *pDc, const RECT &rect, COLORREF clrLeft, COLORREF clrRight);\r
80 \r
81         /**\r
82         Returns TRUE if Windows XP theme support is available, FALSE \r
83         otherwise.\r
84         */\r
85         BOOL ThemeSupport() const;\r
86 \r
87 protected:\r
88         //{{AFX_VIRTUAL(CPropPageFrameDefault)\r
89         //}}AFX_VIRTUAL\r
90 \r
91 // message handlers\r
92 protected:\r
93         //{{AFX_MSG(CPropPageFrameDefault)\r
94         afx_msg void OnPaint();\r
95         afx_msg BOOL OnEraseBkgnd(CDC* pDC);\r
96         //}}AFX_MSG\r
97         DECLARE_MESSAGE_MAP()\r
98 \r
99 // attributes\r
100 protected:\r
101         /** \r
102         Image list that contains only the current icon or nothing if there\r
103         is no icon.\r
104         */\r
105         CImageList m_Images;\r
106 };\r
107 \r
108 \r
109 } //namespace TreePropSheet\r
110 \r
111 \r
112 /////////////////////////////////////////////////////////////////////////////\r
113 \r
114 //{{AFX_INSERT_LOCATION}}\r
115 // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.\r
116 \r
117 #endif // AFX_PROPPAGEFRAMEDEFAULT_H__5C5B7AC9_2DF5_4E8C_8F5E_DE2CC04BBED7__INCLUDED_\r