-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVisualStylesXP.h
423 lines (366 loc) · 17.2 KB
/
VisualStylesXP.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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
#ifndef _VISUALSTYLE_XP_H_
#define _VISUALSTYLE_XP_H_
// VisualStylesXP.h : header file
//
// Diese Datei ist Bestandteil von EasyCash&Tax, der freien EÜR-Fibu
//
// Copyleft (GPLv3) 2020 Thomas Mielke
//
// Dies ist freie Software; Sie dürfen sie unter den Bedingungen der
// GNU General Public License, wie von der Free Software Foundation
// veröffentlicht, weiterverteilen und/oder modifizieren; entweder gemäß
// Version 3 der Lizenz oder (nach Ihrer Option) jeder späteren Version.
//
// Diese Software wird in der Hoffnung weiterverbreitet, dass sie nützlich
// sein wird, jedoch OHNE IRGENDEINE GARANTIE, auch ohne die implizierte
// Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK.
// Mehr Details finden Sie in der GNU Lesser General Public License.
//
// Sie sollten eine Kopie der GNU General Public License Version 3 zusammen mit
// dieser Software erhalten haben; falls nicht, schreiben Sie an die Free
// Software Foundation, Inc., 51 Franklin St, 5th Floor, Boston, MA 02110, USA.
#pragma once
#include "uxtheme.h"
#include "tmschema.h"
enum EXP_State {
XPS_NORMAL =1,
XPS_HOT =2,
XPS_PRESSED =3,
XPS_DISABLED=4
};
enum EXP_ToolBarState {
XPS_TB_NORMAL =1,
XPS_TB_HOT =2,
XPS_TB_PRESSED =3,
XPS_TB_DISABLED =4,
XPS_TB_CHECKED =5,
XPS_TB_HOTCHECKED =6
};
enum EXP_SliderThumbState {
XPS_ST_NORMAL =1,
XPS_ST_HOT =2,
XPS_ST_PRESSED =3,
XPS_ST_FOCUS =4,
XPS_ST_DISABLED=5
};
enum EXP_CheckBoxIndex {
XPS_CB_Unchecked =0,
XPS_CB_Checked =4,
XPS_CB_Mixed =8
};
enum EXP_SBArrowsIndex {
XPS_SBArrows_Up =0,
XPS_SBArrows_Down =4,
XPS_SBArrows_Left =8,
XPS_SBArrows_Right =12
};
class CVisualStylesXP
{
private:
HMODULE m_hThemeDll;
void* GetProc(LPCSTR szProc, void* pfnFail);
typedef HTHEME(__stdcall *PFNOPENTHEMEDATA)(HWND hwnd, LPCWSTR pszClassList);
static HTHEME OpenThemeDataFail(HWND , LPCWSTR )
{return NULL;}
typedef HRESULT(__stdcall *PFNCLOSETHEMEDATA)(HTHEME hTheme);
static HRESULT CloseThemeDataFail(HTHEME)
{return E_FAIL;}
typedef HRESULT(__stdcall *PFNDRAWTHEMEBACKGROUND)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect);
static HRESULT DrawThemeBackgroundFail(HTHEME, HDC, int, int, const RECT *, const RECT *)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNDRAWTHEMETEXT)(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags,
DWORD dwTextFlags2, const RECT *pRect);
static HRESULT DrawThemeTextFail(HTHEME, HDC, int, int, LPCWSTR, int, DWORD, DWORD, const RECT*)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEBACKGROUNDCONTENTRECT)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pBoundingRect,
RECT *pContentRect);
static HRESULT GetThemeBackgroundContentRectFail(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pBoundingRect,
RECT *pContentRect)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEBACKGROUNDEXTENT)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pContentRect,
RECT *pExtentRect);
static HRESULT GetThemeBackgroundExtentFail(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pContentRect,
RECT *pExtentRect)
{return E_FAIL;}
typedef HRESULT(__stdcall *PFNGETTHEMEPARTSIZE)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, RECT * pRect, enum THEMESIZE eSize, SIZE *psz);
static HRESULT GetThemePartSizeFail(HTHEME, HDC, int, int, RECT *, enum THEMESIZE, SIZE *)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMETEXTEXTENT)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, LPCWSTR pszText, int iCharCount,
DWORD dwTextFlags, const RECT *pBoundingRect,
RECT *pExtentRect);
static HRESULT GetThemeTextExtentFail(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, LPCWSTR pszText, int iCharCount,
DWORD dwTextFlags, const RECT *pBoundingRect,
RECT *pExtentRect)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMETEXTMETRICS)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, TEXTMETRIC* ptm);
static HRESULT GetThemeTextMetricsFail(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, TEXTMETRIC* ptm)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEBACKGROUNDREGION)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pRect, HRGN *pRegion);
static HRESULT GetThemeBackgroundRegionFail(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pRect, HRGN *pRegion)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNHITTESTTHEMEBACKGROUND)(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, DWORD dwOptions, const RECT *pRect, HRGN hrgn,
POINT ptTest, WORD *pwHitTestCode);
static HRESULT HitTestThemeBackgroundFail(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, DWORD dwOptions, const RECT *pRect, HRGN hrgn,
POINT ptTest, WORD *pwHitTestCode)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNDRAWTHEMEEDGE)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect);
static HRESULT DrawThemeEdgeFail(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNDRAWTHEMEICON)(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex);
static HRESULT DrawThemeIconFail(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex)
{return E_FAIL;}
typedef BOOL (__stdcall *PFNISTHEMEPARTDEFINED)(HTHEME hTheme, int iPartId,
int iStateId);
static BOOL IsThemePartDefinedFail(HTHEME hTheme, int iPartId,
int iStateId)
{return FALSE;}
typedef BOOL (__stdcall *PFNISTHEMEBACKGROUNDPARTIALLYTRANSPARENT)(HTHEME hTheme,
int iPartId, int iStateId);
static BOOL IsThemeBackgroundPartiallyTransparentFail(HTHEME hTheme,
int iPartId, int iStateId)
{return FALSE;}
typedef HRESULT (__stdcall *PFNGETTHEMECOLOR)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, COLORREF *pColor);
static HRESULT GetThemeColorFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, COLORREF *pColor)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEMETRIC)(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, int *piVal);
static HRESULT GetThemeMetricFail(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, int *piVal)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMESTRING)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars);
static HRESULT GetThemeStringFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEBOOL)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, BOOL *pfVal);
static HRESULT GetThemeBoolFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, BOOL *pfVal)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEINT)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, int *piVal);
static HRESULT GetThemeIntFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, int *piVal)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEENUMVALUE)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, int *piVal);
static HRESULT GetThemeEnumValueFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, int *piVal)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEPOSITION)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, POINT *pPoint);
static HRESULT GetThemePositionFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, POINT *pPoint)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEFONT)(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, LOGFONT *pFont);
static HRESULT GetThemeFontFail(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, LOGFONT *pFont)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMERECT)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, RECT *pRect);
static HRESULT GetThemeRectFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, RECT *pRect)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEMARGINS)(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, RECT *prc, MARGINS *pMargins);
static HRESULT GetThemeMarginsFail(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, RECT *prc, MARGINS *pMargins)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEINTLIST)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, INTLIST *pIntList);
static HRESULT GetThemeIntListFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, INTLIST *pIntList)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEPROPERTYORIGIN)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, enum PROPERTYORIGIN *pOrigin);
static HRESULT GetThemePropertyOriginFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, enum PROPERTYORIGIN *pOrigin)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNSETWINDOWTHEME)(HWND hwnd, LPCWSTR pszSubAppName,
LPCWSTR pszSubIdList);
static HRESULT SetWindowThemeFail(HWND hwnd, LPCWSTR pszSubAppName,
LPCWSTR pszSubIdList)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEFILENAME)(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, LPWSTR pszThemeFileName, int cchMaxBuffChars);
static HRESULT GetThemeFilenameFail(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, LPWSTR pszThemeFileName, int cchMaxBuffChars)
{return E_FAIL;}
typedef COLORREF (__stdcall *PFNGETTHEMESYSCOLOR)(HTHEME hTheme, int iColorId);
static COLORREF GetThemeSysColorFail(HTHEME hTheme, int iColorId)
{return RGB(255,255,255);}
typedef HBRUSH (__stdcall *PFNGETTHEMESYSCOLORBRUSH)(HTHEME hTheme, int iColorId);
static HBRUSH GetThemeSysColorBrushFail(HTHEME hTheme, int iColorId)
{return NULL;}
typedef BOOL (__stdcall *PFNGETTHEMESYSBOOL)(HTHEME hTheme, int iBoolId);
static BOOL GetThemeSysBoolFail(HTHEME hTheme, int iBoolId)
{return FALSE;}
typedef int (__stdcall *PFNGETTHEMESYSSIZE)(HTHEME hTheme, int iSizeId);
static int GetThemeSysSizeFail(HTHEME hTheme, int iSizeId)
{return 0;}
typedef HRESULT (__stdcall *PFNGETTHEMESYSFONT)(HTHEME hTheme, int iFontId, LOGFONT *plf);
static HRESULT GetThemeSysFontFail(HTHEME hTheme, int iFontId, LOGFONT *plf)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMESYSSTRING)(HTHEME hTheme, int iStringId,
LPWSTR pszStringBuff, int cchMaxStringChars);
static HRESULT GetThemeSysStringFail(HTHEME hTheme, int iStringId,
LPWSTR pszStringBuff, int cchMaxStringChars)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMESYSINT)(HTHEME hTheme, int iIntId, int *piValue);
static HRESULT GetThemeSysIntFail(HTHEME hTheme, int iIntId, int *piValue)
{return E_FAIL;}
typedef BOOL (__stdcall *PFNISTHEMEACTIVE)();
static BOOL IsThemeActiveFail()
{return FALSE;}
typedef BOOL(__stdcall *PFNISAPPTHEMED)();
static BOOL IsAppThemedFail()
{return FALSE;}
typedef HTHEME (__stdcall *PFNGETWINDOWTHEME)(HWND hwnd);
static HTHEME GetWindowThemeFail(HWND hwnd)
{return NULL;}
typedef HRESULT (__stdcall *PFNENABLETHEMEDIALOGTEXTURE)(HWND hwnd, DWORD dwFlags);
static HRESULT EnableThemeDialogTextureFail(HWND hwnd, DWORD dwFlags)
{return E_FAIL;}
typedef BOOL (__stdcall *PFNISTHEMEDIALOGTEXTUREENABLED)(HWND hwnd);
static BOOL IsThemeDialogTextureEnabledFail(HWND hwnd)
{return FALSE;}
typedef DWORD (__stdcall *PFNGETTHEMEAPPPROPERTIES)();
static DWORD GetThemeAppPropertiesFail()
{return 0;}
typedef void (__stdcall *PFNSETTHEMEAPPPROPERTIES)(DWORD dwFlags);
static void SetThemeAppPropertiesFail(DWORD dwFlags)
{return;}
typedef HRESULT (__stdcall *PFNGETCURRENTTHEMENAME)(
LPWSTR pszThemeFileName, int cchMaxNameChars,
LPWSTR pszColorBuff, int cchMaxColorChars,
LPWSTR pszSizeBuff, int cchMaxSizeChars);
static HRESULT GetCurrentThemeNameFail(
LPWSTR pszThemeFileName, int cchMaxNameChars,
LPWSTR pszColorBuff, int cchMaxColorChars,
LPWSTR pszSizeBuff, int cchMaxSizeChars)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNGETTHEMEDOCUMENTATIONPROPERTY)(LPCWSTR pszThemeName,
LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars);
static HRESULT GetThemeDocumentationPropertyFail(LPCWSTR pszThemeName,
LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNDRAWTHEMEPARENTBACKGROUND)(HWND hwnd, HDC hdc, RECT* prc);
static HRESULT DrawThemeParentBackgroundFail(HWND hwnd, HDC hdc, RECT* prc)
{return E_FAIL;}
typedef HRESULT (__stdcall *PFNENABLETHEMING)(BOOL fEnable);
static HRESULT EnableThemingFail(BOOL fEnable)
{return E_FAIL;}
public:
HTHEME OpenThemeData(HWND hwnd, LPCWSTR pszClassList);
HRESULT CloseThemeData(HTHEME hTheme);
HRESULT DrawThemeBackground(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect);
HRESULT DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags,
DWORD dwTextFlags2, const RECT *pRect);
HRESULT GetThemeBackgroundContentRect(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pBoundingRect,
RECT *pContentRect);
HRESULT GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pContentRect,
RECT *pExtentRect);
HRESULT GetThemePartSize(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, RECT * pRect, enum THEMESIZE eSize, SIZE *psz);
HRESULT GetThemeTextExtent(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, LPCWSTR pszText, int iCharCount,
DWORD dwTextFlags, const RECT *pBoundingRect,
RECT *pExtentRect);
HRESULT GetThemeTextMetrics(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, TEXTMETRIC* ptm);
HRESULT GetThemeBackgroundRegion(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pRect, HRGN *pRegion);
HRESULT HitTestThemeBackground(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, DWORD dwOptions, const RECT *pRect, HRGN hrgn,
POINT ptTest, WORD *pwHitTestCode);
HRESULT DrawThemeEdge(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect);
HRESULT DrawThemeIcon(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex);
BOOL IsThemePartDefined(HTHEME hTheme, int iPartId,
int iStateId);
BOOL IsThemeBackgroundPartiallyTransparent(HTHEME hTheme,
int iPartId, int iStateId);
HRESULT GetThemeColor(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, COLORREF *pColor);
HRESULT GetThemeMetric(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, int *piVal);
HRESULT GetThemeString(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars);
HRESULT GetThemeBool(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, BOOL *pfVal);
HRESULT GetThemeInt(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, int *piVal);
HRESULT GetThemeEnumValue(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, int *piVal);
HRESULT GetThemePosition(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, POINT *pPoint);
HRESULT GetThemeFont(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, LOGFONT *pFont);
HRESULT GetThemeRect(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, RECT *pRect);
HRESULT GetThemeMargins(HTHEME hTheme, HDC hdc, int iPartId,
int iStateId, int iPropId, RECT *prc, MARGINS *pMargins);
HRESULT GetThemeIntList(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, INTLIST *pIntList);
HRESULT GetThemePropertyOrigin(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, enum PROPERTYORIGIN *pOrigin);
HRESULT SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,
LPCWSTR pszSubIdList);
HRESULT GetThemeFilename(HTHEME hTheme, int iPartId,
int iStateId, int iPropId, LPWSTR pszThemeFileName, int cchMaxBuffChars);
COLORREF GetThemeSysColor(HTHEME hTheme, int iColorId);
HBRUSH GetThemeSysColorBrush(HTHEME hTheme, int iColorId);
BOOL GetThemeSysBool(HTHEME hTheme, int iBoolId);
int GetThemeSysSize(HTHEME hTheme, int iSizeId);
HRESULT GetThemeSysFont(HTHEME hTheme, int iFontId, LOGFONT *plf);
HRESULT GetThemeSysString(HTHEME hTheme, int iStringId,
LPWSTR pszStringBuff, int cchMaxStringChars);
HRESULT GetThemeSysInt(HTHEME hTheme, int iIntId, int *piValue);
BOOL IsThemeActive();
BOOL IsAppThemed();
HTHEME GetWindowTheme(HWND hwnd);
HRESULT EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags);
BOOL IsThemeDialogTextureEnabled(HWND hwnd);
DWORD GetThemeAppProperties();
void SetThemeAppProperties(DWORD dwFlags);
HRESULT GetCurrentThemeName(
LPWSTR pszThemeFileName, int cchMaxNameChars,
LPWSTR pszColorBuff, int cchMaxColorChars,
LPWSTR pszSizeBuff, int cchMaxSizeChars);
HRESULT GetThemeDocumentationProperty(LPCWSTR pszThemeName,
LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars);
HRESULT DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT* prc);
HRESULT EnableTheming(BOOL fEnable);
public:
CVisualStylesXP(void);
~CVisualStylesXP(void);
};
extern CVisualStylesXP g_xpStyle;
#endif