forked from irwir/eMule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTreePropSheetPgFrameDef.h
93 lines (82 loc) · 2.15 KB
/
TreePropSheetPgFrameDef.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/********************************************************************
*
* Copyright (c) 2002 Sven Wiegand <mail@sven-wiegand.de>
*
* You can use this and modify this in any way you want,
* BUT LEAVE THIS HEADER INTACT.
*
* Redistribution is appreciated.
*
* $Workfile:$
* $Revision:$
* $Modtime:$
* $Author:$
*
* Revision History:
* $History:$
*
*********************************************************************/
#pragma once
#include "TreePropSheetPgFrame.h"
/**
An implementation of CPropPageFrame, that works well for Windows XP
styled systems and older windows versions (without themes).
@author Sven Wiegand
*/
class /*AFX_EXT_CLASS*/ CPropPageFrameDefault : public CWnd,
public CPropPageFrame
{
// construction/destruction
public:
CPropPageFrameDefault();
virtual ~CPropPageFrameDefault();
// operations
public:
// overridings
public:
virtual BOOL Create(DWORD dwWindowStyle, const RECT &rect, CWnd *pwndParent, UINT nID);
virtual CWnd* GetWnd();
virtual void SetCaption(LPCTSTR lpszCaption, HICON hIcon = NULL);
protected:
virtual CRect CalcMsgArea();
virtual CRect CalcCaptionArea();
virtual void DrawCaption(CDC *pDc, CRect rect, LPCTSTR lpszCaption, HICON hIcon);
// Implementation helpers
protected:
/**
Fills a rectangular area with a gradient color starting at the left
side with the color clrLeft and ending at the right sight with the
color clrRight.
@param pDc
Device context to draw the rectangle in.
@param rect
Rectangular area to fill.
@param clrLeft
Color on the left side.
@param clrRight
Color on the right side.
*/
void FillGradientRectH(CDC *pDc, const RECT &rect, COLORREF clrLeft, COLORREF clrRight);
/**
Returns TRUE if Windows XP theme support is available, FALSE
otherwise.
*/
BOOL ThemeSupport() const;
protected:
//{{AFX_VIRTUAL(CPropPageFrameDefault)
//}}AFX_VIRTUAL
// message handlers
protected:
//{{AFX_MSG(CPropPageFrameDefault)
afx_msg void OnPaint();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// attributes
protected:
/**
Image list that contains only the current icon or nothing if there
is no icon.
*/
CImageList m_Images;
};