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