-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMWColors.h
190 lines (151 loc) · 5.94 KB
/
MWColors.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#pragma once
#include <Windows.h>
//
/////////////////////////////////////////////////////////////////////////////
// See Also https://www.codeproject.com/Articles/620045/Custom-Controls-in-Win-API-Visual-Styles
/////////////////////////////////////////////////////////////////////////////
#define WINDOWS_THEME_NULL NULL,NULL
#define WINDOWS_THEME_EXPLORER L"Explorer",NULL
#define WINDOWS_THEME_OLD L"",L""
#define WINDOWS_THEME_RESET WINDOWS_THEME_EXPLORER
//
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
class CMWColors
{
public:
CMWColors(void);
virtual ~CMWColors(void);
public :
static int m_iDarkTheme;
public :
//
static COLORREF GetBlackCR();
static COLORREF GetWhiteCR();
static COLORREF GetGreyCR();
static COLORREF GetRedCR();
static COLORREF GetGreenCR();
static COLORREF GetBlueCR();
static COLORREF GetCyanCR();
static COLORREF GetMagentaCR();
static COLORREF GetYellowCR();
//
static HBRUSH GetBlackBrush();
static HBRUSH GetWhiteBrush();
static HBRUSH GetGreyBrush();
static HBRUSH GetCyanBrush();
static HBRUSH GetMagentaBrush();
static HBRUSH GetYellowBrush();
static HBRUSH GetRedBrush();
static HBRUSH GetGreenBrush();
static HBRUSH GetBlueBrush();
//
static CBrush *GetBlackCBrush();
static CBrush *GetWhiteCBrush();
static CBrush *GetGreyCBrush();
static CBrush *GetRedCBrush();
static CBrush *GetGreenCBrush();
static CBrush *GetBlueCBrush();
static CBrush *GetCyanCBrush();
static CBrush *GetMagentaCBrush();
static CBrush *GetYellowCBrush();
//
protected:
static HBRUSH GetGreyC0Brush();
static HBRUSH GetBlack10Brush();
static HBRUSH GetBlack20Brush();
static HBRUSH GetBlack30Brush();
static HBRUSH GetBlack40Brush();
static HBRUSH GetWhiteCFBrush();
static HBRUSH GetWhiteDFBrush();
static HBRUSH GetWhiteEFBrush();
static CBrush *GetGreyC0CBrush();
static CBrush *GetBlack10CBrush();
static CBrush *GetBlack20CBrush();
static CBrush *GetBlack30CBrush();
static CBrush *GetBlack40CBrush();
static CBrush *GetWhiteCFCBrush();
static CBrush *GetWhiteDFCBrush();
static CBrush *GetWhiteEFCBrush();
//
static COLORREF GetGreyC0CR();
static COLORREF GetBlack10CR();
static COLORREF GetBlack20CR();
static COLORREF GetBlack30CR();
static COLORREF GetBlack40CR();
static COLORREF GetWhiteCFCR();
static COLORREF GetWhiteDFCR();
static COLORREF GetWhiteEFCR();
//
public :
// COLORREF
static COLORREF GetFGNormalCR ( bool bDark );
static COLORREF GetFGSelectedCR ( bool bDark );
static COLORREF GetFGDisabledCR ( bool bDark );
static COLORREF GetFGMenuCR ( bool bDark );
static COLORREF GetFGMenuSelectedCR ( bool bDark );
static COLORREF GetFGHeaderCR ( bool bDark );
//
static COLORREF GetBKNormalCR ( bool bDark );
static COLORREF GetBKSelectedCR ( bool bDark );
static COLORREF GetBKDisabledCR ( bool bDark );
static COLORREF GetBKMenuCR ( bool bDark );
static COLORREF GetBKMenuSelectedCR ( bool bDark );
static COLORREF GetBKHeaderCR ( bool bDark );
// CBrush
static CBrush * GetFGNormalCBrush ( bool bDark );
static CBrush * GetFGSelectedCBrush ( bool bDark );
static CBrush * GetFGDisabledCBrush ( bool bDark );
static CBrush * GetFGMenuCBrush ( bool bDark );
static CBrush * GetFGMenuSelectedCBrush ( bool bDark );
static CBrush * GetFGHeaderCBrush ( bool bDark );
//
static CBrush * GetBKNormalCBrush ( bool bDark );
static CBrush * GetBKSelectedCBrush ( bool bDark );
static CBrush * GetBKDisabledCBrush ( bool bDark );
static CBrush * GetBKMenuCBrush ( bool bDark );
static CBrush * GetBKMenuSelectedCBrush ( bool bDark );
static CBrush * GetBKHeaderCBrush ( bool bDark );
// HBRUSH
static HBRUSH GetFGNormalBrush ( bool bDark );
static HBRUSH GetFGSelectedBrush ( bool bDark );
static HBRUSH GetFGDisabledBrush ( bool bDark );
static HBRUSH GetFGMenuBrush ( bool bDark );
static HBRUSH GetFGMenuSelectedBrush ( bool bDark );
static HBRUSH GetFGHeaderBrush ( bool bDark );
//
static HBRUSH GetBKNormalBrush ( bool bDark );
static HBRUSH GetBKSelectedBrush ( bool bDark );
static HBRUSH GetBKDisabledBrush ( bool bDark );
static HBRUSH GetBKMenuBrush ( bool bDark );
static HBRUSH GetBKMenuSelectedBrush ( bool bDark );
static HBRUSH GetBKHeaderBrush ( bool bDark );
static COLORREF GetFGTipColor(bool bDark);
static COLORREF GetBKTipColor(bool bDark);
public :
static void Instanciate();
//
protected :
static CBrush BlackBrush;
static CBrush WhiteBrush;
static CBrush GreyBrush;
static CBrush RedBrush;
static CBrush GreenBrush;
static CBrush BlueBrush;
static CBrush CyanBrush;
static CBrush MagentaBrush;
static CBrush YellowBrush;
static CBrush Grey192Brush;
static CBrush Black10Brush;
static CBrush Black20Brush;
static CBrush Black30Brush;
static CBrush Black40Brush;
static CBrush WhiteCFBrush;
static CBrush WhiteDFBrush;
static CBrush WhiteEFBrush;
public :
static HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
static BOOL OnEraseBkgnd(CDC* pDC, CWnd* pWnd);
static void SetWindowTheme ( CWnd *pWnd );
};