Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PropPageFrameDefault.h « TreePropSheet « ui « src - github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 20c0341e421f43c28221ca7eeeb57b11ce5e6618 (plain)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/********************************************************************
*
* 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: 126 $
* $Modtime:$
* $Author: gabest $
*
* Revision History:
*	$History:$
*
*********************************************************************/


#if !defined(AFX_PROPPAGEFRAMEDEFAULT_H__5C5B7AC9_2DF5_4E8C_8F5E_DE2CC04BBED7__INCLUDED_)
#define AFX_PROPPAGEFRAMEDEFAULT_H__5C5B7AC9_2DF5_4E8C_8F5E_DE2CC04BBED7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "PropPageFrame.h"
#include <afxcmn.h>


namespace TreePropSheet
{


/**
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;
};


} //namespace TreePropSheet


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.

#endif // AFX_PROPPAGEFRAMEDEFAULT_H__5C5B7AC9_2DF5_4E8C_8F5E_DE2CC04BBED7__INCLUDED_