7 #include <tmschema.h>
\r
9 #ifndef WM_THEMECHANGED
\r
10 #define WM_THEMECHANGED 0x031A
\r
13 #pragma warning(push)
\r
14 #pragma warning(disable : 4100)
\r
21 static HMODULE m_hThemeDll;
\r
22 static BOOL m_bLoaded;
\r
24 static void* GetProc(LPCSTR szProc, void* pfnFail);
\r
26 typedef HTHEME(__stdcall *PFNOPENTHEMEDATA)(HWND hwnd, LPCWSTR pszClassList);
\r
27 static HTHEME __stdcall OpenThemeDataFail(HWND , LPCWSTR )
\r
29 static PFNOPENTHEMEDATA m_pOpenThemeData;
\r
31 typedef HRESULT(__stdcall *PFNCLOSETHEMEDATA)(HTHEME hTheme);
\r
32 static HRESULT __stdcall CloseThemeDataFail(HTHEME)
\r
34 static PFNCLOSETHEMEDATA m_pCloseThemeData;
\r
36 typedef HRESULT(__stdcall *PFNDRAWTHEMEBACKGROUND)(HTHEME hTheme, HDC hdc,
\r
37 int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect);
\r
38 static HRESULT __stdcall DrawThemeBackgroundFail(HTHEME, HDC, int, int, const RECT *, const RECT *)
\r
40 static PFNDRAWTHEMEBACKGROUND m_pDrawThemeBackground;
\r
42 typedef HRESULT (__stdcall *PFNDRAWTHEMETEXT)(HTHEME hTheme, HDC hdc, int iPartId,
\r
43 int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags,
\r
44 DWORD dwTextFlags2, const RECT *pRect);
\r
45 static HRESULT __stdcall DrawThemeTextFail(HTHEME, HDC, int, int, LPCWSTR, int, DWORD, DWORD, const RECT*)
\r
47 static PFNDRAWTHEMETEXT m_pDrawThemeText;
\r
49 typedef HRESULT (__stdcall *PFNGETTHEMEBACKGROUNDCONTENTRECT)(HTHEME hTheme, HDC hdc,
\r
50 int iPartId, int iStateId, const RECT *pBoundingRect,
\r
51 RECT *pContentRect);
\r
52 static HRESULT __stdcall GetThemeBackgroundContentRectFail(HTHEME hTheme, HDC hdc,
\r
53 int iPartId, int iStateId, const RECT *pBoundingRect,
\r
56 static PFNGETTHEMEBACKGROUNDCONTENTRECT m_pGetThemeBackgroundContentRect;
\r
58 typedef HRESULT (__stdcall *PFNGETTHEMEBACKGROUNDEXTENT)(HTHEME hTheme, HDC hdc,
\r
59 int iPartId, int iStateId, const RECT *pContentRect,
\r
61 static HRESULT __stdcall GetThemeBackgroundExtentFail(HTHEME hTheme, HDC hdc,
\r
62 int iPartId, int iStateId, const RECT *pContentRect,
\r
65 static PFNGETTHEMEBACKGROUNDEXTENT m_pGetThemeBackgroundExtent;
\r
67 typedef HRESULT(__stdcall *PFNGETTHEMEPARTSIZE)(HTHEME hTheme, HDC hdc,
\r
68 int iPartId, int iStateId, RECT * pRect, enum THEMESIZE eSize, SIZE *psz);
\r
69 static HRESULT __stdcall GetThemePartSizeFail(HTHEME, HDC, int, int, RECT *, enum THEMESIZE, SIZE *)
\r
71 static PFNGETTHEMEPARTSIZE m_pGetThemePartSize;
\r
73 typedef HRESULT (__stdcall *PFNGETTHEMETEXTEXTENT)(HTHEME hTheme, HDC hdc,
\r
74 int iPartId, int iStateId, LPCWSTR pszText, int iCharCount,
\r
75 DWORD dwTextFlags, const RECT *pBoundingRect,
\r
77 static HRESULT __stdcall GetThemeTextExtentFail(HTHEME hTheme, HDC hdc,
\r
78 int iPartId, int iStateId, LPCWSTR pszText, int iCharCount,
\r
79 DWORD dwTextFlags, const RECT *pBoundingRect,
\r
82 static PFNGETTHEMETEXTEXTENT m_pGetThemeTextExtent;
\r
84 typedef HRESULT (__stdcall *PFNGETTHEMETEXTMETRICS)(HTHEME hTheme, HDC hdc,
\r
85 int iPartId, int iStateId, TEXTMETRIC* ptm);
\r
86 static HRESULT __stdcall GetThemeTextMetricsFail(HTHEME hTheme, HDC hdc,
\r
87 int iPartId, int iStateId, TEXTMETRIC* ptm)
\r
89 static PFNGETTHEMETEXTMETRICS m_pGetThemeTextMetrics;
\r
91 typedef HRESULT (__stdcall *PFNGETTHEMEBACKGROUNDREGION)(HTHEME hTheme, HDC hdc,
\r
92 int iPartId, int iStateId, const RECT *pRect, HRGN *pRegion);
\r
93 static HRESULT __stdcall GetThemeBackgroundRegionFail(HTHEME hTheme, HDC hdc,
\r
94 int iPartId, int iStateId, const RECT *pRect, HRGN *pRegion)
\r
96 static PFNGETTHEMEBACKGROUNDREGION m_pGetThemeBackgroundRegion;
\r
98 typedef HRESULT (__stdcall *PFNHITTESTTHEMEBACKGROUND)(HTHEME hTheme, HDC hdc, int iPartId,
\r
99 int iStateId, DWORD dwOptions, const RECT *pRect, HRGN hrgn,
\r
100 POINT ptTest, WORD *pwHitTestCode);
\r
101 static HRESULT __stdcall HitTestThemeBackgroundFail(HTHEME hTheme, HDC hdc, int iPartId,
\r
102 int iStateId, DWORD dwOptions, const RECT *pRect, HRGN hrgn,
\r
103 POINT ptTest, WORD *pwHitTestCode)
\r
105 static PFNHITTESTTHEMEBACKGROUND m_pHitTestThemeBackground;
\r
107 typedef HRESULT (__stdcall *PFNDRAWTHEMEEDGE)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
\r
108 const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect);
\r
109 static HRESULT __stdcall DrawThemeEdgeFail(HTHEME hTheme, HDC hdc, int iPartId, int iStateId,
\r
110 const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect)
\r
112 static PFNDRAWTHEMEEDGE m_pDrawThemeEdge;
\r
114 typedef HRESULT (__stdcall *PFNDRAWTHEMEICON)(HTHEME hTheme, HDC hdc, int iPartId,
\r
115 int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex);
\r
116 static HRESULT __stdcall DrawThemeIconFail(HTHEME hTheme, HDC hdc, int iPartId,
\r
117 int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex)
\r
119 static PFNDRAWTHEMEICON m_pDrawThemeIcon;
\r
121 typedef BOOL (__stdcall *PFNISTHEMEPARTDEFINED)(HTHEME hTheme, int iPartId,
\r
123 static BOOL __stdcall IsThemePartDefinedFail(HTHEME hTheme, int iPartId,
\r
126 static PFNISTHEMEPARTDEFINED m_pIsThemePartDefined;
\r
128 typedef BOOL (__stdcall *PFNISTHEMEBACKGROUNDPARTIALLYTRANSPARENT)(HTHEME hTheme,
\r
129 int iPartId, int iStateId);
\r
130 static BOOL __stdcall IsThemeBackgroundPartiallyTransparentFail(HTHEME hTheme,
\r
131 int iPartId, int iStateId)
\r
133 static PFNISTHEMEBACKGROUNDPARTIALLYTRANSPARENT m_pIsThemeBackgroundPartiallyTransparent;
\r
135 typedef HRESULT (__stdcall *PFNGETTHEMECOLOR)(HTHEME hTheme, int iPartId,
\r
136 int iStateId, int iPropId, COLORREF *pColor);
\r
137 static HRESULT __stdcall GetThemeColorFail(HTHEME hTheme, int iPartId,
\r
138 int iStateId, int iPropId, COLORREF *pColor)
\r
140 static PFNGETTHEMECOLOR m_pGetThemeColor;
\r
142 typedef HRESULT (__stdcall *PFNGETTHEMEMETRIC)(HTHEME hTheme, HDC hdc, int iPartId,
\r
143 int iStateId, int iPropId, int *piVal);
\r
144 static HRESULT __stdcall GetThemeMetricFail(HTHEME hTheme, HDC hdc, int iPartId,
\r
145 int iStateId, int iPropId, int *piVal)
\r
147 static PFNGETTHEMEMETRIC m_pGetThemeMetric;
\r
149 typedef HRESULT (__stdcall *PFNGETTHEMESTRING)(HTHEME hTheme, int iPartId,
\r
150 int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars);
\r
151 static HRESULT __stdcall GetThemeStringFail(HTHEME hTheme, int iPartId,
\r
152 int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars)
\r
154 static PFNGETTHEMESTRING m_pGetThemeString;
\r
156 typedef HRESULT (__stdcall *PFNGETTHEMEBOOL)(HTHEME hTheme, int iPartId,
\r
157 int iStateId, int iPropId, BOOL *pfVal);
\r
158 static HRESULT __stdcall GetThemeBoolFail(HTHEME hTheme, int iPartId,
\r
159 int iStateId, int iPropId, BOOL *pfVal)
\r
161 static PFNGETTHEMEBOOL m_pGetThemeBool;
\r
163 typedef HRESULT (__stdcall *PFNGETTHEMEINT)(HTHEME hTheme, int iPartId,
\r
164 int iStateId, int iPropId, int *piVal);
\r
165 static HRESULT __stdcall GetThemeIntFail(HTHEME hTheme, int iPartId,
\r
166 int iStateId, int iPropId, int *piVal)
\r
168 static PFNGETTHEMEINT m_pGetThemeInt;
\r
170 typedef HRESULT (__stdcall *PFNGETTHEMEENUMVALUE)(HTHEME hTheme, int iPartId,
\r
171 int iStateId, int iPropId, int *piVal);
\r
172 static HRESULT __stdcall GetThemeEnumValueFail(HTHEME hTheme, int iPartId,
\r
173 int iStateId, int iPropId, int *piVal)
\r
175 static PFNGETTHEMEENUMVALUE m_pGetThemeEnumValue;
\r
177 typedef HRESULT (__stdcall *PFNGETTHEMEPOSITION)(HTHEME hTheme, int iPartId,
\r
178 int iStateId, int iPropId, POINT *pPoint);
\r
179 static HRESULT __stdcall GetThemePositionFail(HTHEME hTheme, int iPartId,
\r
180 int iStateId, int iPropId, POINT *pPoint)
\r
182 static PFNGETTHEMEPOSITION m_pGetThemePosition;
\r
184 typedef HRESULT (__stdcall *PFNGETTHEMEFONT)(HTHEME hTheme, HDC hdc, int iPartId,
\r
185 int iStateId, int iPropId, LOGFONT *pFont);
\r
186 static HRESULT __stdcall GetThemeFontFail(HTHEME hTheme, HDC hdc, int iPartId,
\r
187 int iStateId, int iPropId, LOGFONT *pFont)
\r
189 static PFNGETTHEMEFONT m_pGetThemeFont;
\r
191 typedef HRESULT (__stdcall *PFNGETTHEMERECT)(HTHEME hTheme, int iPartId,
\r
192 int iStateId, int iPropId, RECT *pRect);
\r
193 static HRESULT __stdcall GetThemeRectFail(HTHEME hTheme, int iPartId,
\r
194 int iStateId, int iPropId, RECT *pRect)
\r
196 static PFNGETTHEMERECT m_pGetThemeRect;
\r
198 typedef HRESULT (__stdcall *PFNGETTHEMEMARGINS)(HTHEME hTheme, HDC hdc, int iPartId,
\r
199 int iStateId, int iPropId, RECT *prc, MARGINS *pMargins);
\r
200 static HRESULT __stdcall GetThemeMarginsFail(HTHEME hTheme, HDC hdc, int iPartId,
\r
201 int iStateId, int iPropId, RECT *prc, MARGINS *pMargins)
\r
203 static PFNGETTHEMEMARGINS m_pGetThemeMargins;
\r
205 typedef HRESULT (__stdcall *PFNGETTHEMEINTLIST)(HTHEME hTheme, int iPartId,
\r
206 int iStateId, int iPropId, INTLIST *pIntList);
\r
207 static HRESULT __stdcall GetThemeIntListFail(HTHEME hTheme, int iPartId,
\r
208 int iStateId, int iPropId, INTLIST *pIntList)
\r
210 static PFNGETTHEMEINTLIST m_pGetThemeIntList;
\r
212 typedef HRESULT (__stdcall *PFNGETTHEMEPROPERTYORIGIN)(HTHEME hTheme, int iPartId,
\r
213 int iStateId, int iPropId, enum PROPERTYORIGIN *pOrigin);
\r
214 static HRESULT __stdcall GetThemePropertyOriginFail(HTHEME hTheme, int iPartId,
\r
215 int iStateId, int iPropId, enum PROPERTYORIGIN *pOrigin)
\r
217 static PFNGETTHEMEPROPERTYORIGIN m_pGetThemePropertyOrigin;
\r
219 typedef HRESULT (__stdcall *PFNSETWINDOWTHEME)(HWND hwnd, LPCWSTR pszSubAppName,
\r
220 LPCWSTR pszSubIdList);
\r
221 static HRESULT __stdcall SetWindowThemeFail(HWND hwnd, LPCWSTR pszSubAppName,
\r
222 LPCWSTR pszSubIdList)
\r
224 static PFNSETWINDOWTHEME m_pSetWindowTheme;
\r
226 typedef HRESULT (__stdcall *PFNGETTHEMEFILENAME)(HTHEME hTheme, int iPartId,
\r
227 int iStateId, int iPropId, LPWSTR pszThemeFileName, int cchMaxBuffChars);
\r
228 static HRESULT __stdcall GetThemeFilenameFail(HTHEME hTheme, int iPartId,
\r
229 int iStateId, int iPropId, LPWSTR pszThemeFileName, int cchMaxBuffChars)
\r
231 static PFNGETTHEMEFILENAME m_pGetThemeFilename;
\r
233 typedef COLORREF (__stdcall *PFNGETTHEMESYSCOLOR)(HTHEME hTheme, int iColorId);
\r
234 static COLORREF __stdcall GetThemeSysColorFail(HTHEME hTheme, int iColorId)
\r
235 {return RGB(255,255,255);}
\r
236 static PFNGETTHEMESYSCOLOR m_pGetThemeSysColor;
\r
238 typedef HBRUSH (__stdcall *PFNGETTHEMESYSCOLORBRUSH)(HTHEME hTheme, int iColorId);
\r
239 static HBRUSH __stdcall GetThemeSysColorBrushFail(HTHEME hTheme, int iColorId)
\r
241 static PFNGETTHEMESYSCOLORBRUSH m_pGetThemeSysColorBrush;
\r
243 typedef BOOL (__stdcall *PFNGETTHEMESYSBOOL)(HTHEME hTheme, int iBoolId);
\r
244 static BOOL __stdcall GetThemeSysBoolFail(HTHEME hTheme, int iBoolId)
\r
246 static PFNGETTHEMESYSBOOL m_pGetThemeSysBool;
\r
248 typedef int (__stdcall *PFNGETTHEMESYSSIZE)(HTHEME hTheme, int iSizeId);
\r
249 static int __stdcall GetThemeSysSizeFail(HTHEME hTheme, int iSizeId)
\r
251 static PFNGETTHEMESYSSIZE m_pGetThemeSysSize;
\r
253 typedef HRESULT (__stdcall *PFNGETTHEMESYSFONT)(HTHEME hTheme, int iFontId, LOGFONT *plf);
\r
254 static HRESULT __stdcall GetThemeSysFontFail(HTHEME hTheme, int iFontId, LOGFONT *plf)
\r
256 static PFNGETTHEMESYSFONT m_pGetThemeSysFont;
\r
258 typedef HRESULT (__stdcall *PFNGETTHEMESYSSTRING)(HTHEME hTheme, int iStringId,
\r
259 LPWSTR pszStringBuff, int cchMaxStringChars);
\r
260 static HRESULT __stdcall GetThemeSysStringFail(HTHEME hTheme, int iStringId,
\r
261 LPWSTR pszStringBuff, int cchMaxStringChars)
\r
263 static PFNGETTHEMESYSSTRING m_pGetThemeSysString;
\r
265 typedef HRESULT (__stdcall *PFNGETTHEMESYSINT)(HTHEME hTheme, int iIntId, int *piValue);
\r
266 static HRESULT __stdcall GetThemeSysIntFail(HTHEME hTheme, int iIntId, int *piValue)
\r
268 static PFNGETTHEMESYSINT m_pGetThemeSysInt;
\r
270 typedef BOOL (__stdcall *PFNISTHEMEACTIVE)();
\r
271 static BOOL __stdcall IsThemeActiveFail()
\r
273 static PFNISTHEMEACTIVE m_pIsThemeActive;
\r
275 typedef BOOL(__stdcall *PFNISAPPTHEMED)();
\r
276 static BOOL __stdcall IsAppThemedFail()
\r
278 static PFNISAPPTHEMED m_pIsAppThemed;
\r
280 typedef HTHEME (__stdcall *PFNGETWINDOWTHEME)(HWND hwnd);
\r
281 static HTHEME __stdcall GetWindowThemeFail(HWND hwnd)
\r
283 static PFNGETWINDOWTHEME m_pGetWindowTheme;
\r
285 typedef HRESULT (__stdcall *PFNENABLETHEMEDIALOGTEXTURE)(HWND hwnd, DWORD dwFlags);
\r
286 static HRESULT __stdcall EnableThemeDialogTextureFail(HWND hwnd, DWORD dwFlags)
\r
288 static PFNENABLETHEMEDIALOGTEXTURE m_pEnableThemeDialogTexture;
\r
290 typedef BOOL (__stdcall *PFNISTHEMEDIALOGTEXTUREENABLED)(HWND hwnd);
\r
291 static BOOL __stdcall IsThemeDialogTextureEnabledFail(HWND hwnd)
\r
293 static PFNISTHEMEDIALOGTEXTUREENABLED m_pIsThemeDialogTextureEnabled;
\r
295 typedef DWORD (__stdcall *PFNGETTHEMEAPPPROPERTIES)();
\r
296 static DWORD __stdcall GetThemeAppPropertiesFail()
\r
298 static PFNGETTHEMEAPPPROPERTIES m_pGetThemeAppProperties;
\r
300 typedef void (__stdcall *PFNSETTHEMEAPPPROPERTIES)(DWORD dwFlags);
\r
301 static void __stdcall SetThemeAppPropertiesFail(DWORD dwFlags)
\r
303 static PFNSETTHEMEAPPPROPERTIES m_pSetThemeAppProperties;
\r
305 typedef HRESULT (__stdcall *PFNGETCURRENTTHEMENAME)(
\r
306 LPWSTR pszThemeFileName, int cchMaxNameChars,
\r
307 LPWSTR pszColorBuff, int cchMaxColorChars,
\r
308 LPWSTR pszSizeBuff, int cchMaxSizeChars);
\r
309 static HRESULT __stdcall GetCurrentThemeNameFail(
\r
310 LPWSTR pszThemeFileName, int cchMaxNameChars,
\r
311 LPWSTR pszColorBuff, int cchMaxColorChars,
\r
312 LPWSTR pszSizeBuff, int cchMaxSizeChars)
\r
314 static PFNGETCURRENTTHEMENAME m_pGetCurrentThemeName;
\r
316 typedef HRESULT (__stdcall *PFNGETTHEMEDOCUMENTATIONPROPERTY)(LPCWSTR pszThemeName,
\r
317 LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars);
\r
318 static HRESULT __stdcall GetThemeDocumentationPropertyFail(LPCWSTR pszThemeName,
\r
319 LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars)
\r
321 static PFNGETTHEMEDOCUMENTATIONPROPERTY m_pGetThemeDocumentationProperty;
\r
323 typedef HRESULT (__stdcall *PFNDRAWTHEMEPARENTBACKGROUND)(HWND hwnd, HDC hdc, RECT* prc);
\r
324 static HRESULT __stdcall DrawThemeParentBackgroundFail(HWND hwnd, HDC hdc, RECT* prc)
\r
326 static PFNDRAWTHEMEPARENTBACKGROUND m_pDrawThemeParentBackground;
\r
328 typedef HRESULT (__stdcall *PFNENABLETHEMING)(BOOL fEnable);
\r
329 static HRESULT __stdcall EnableThemingFail(BOOL fEnable)
\r
331 static PFNENABLETHEMING m_pEnableTheming;
\r
333 BOOL Open(HWND hwnd, LPCWSTR pszClassList);
\r
335 HRESULT DrawBackground(HDC hdc,
\r
336 int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect);
\r
337 HRESULT DrawText(HDC hdc, int iPartId,
\r
338 int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags,
\r
339 DWORD dwTextFlags2, const RECT *pRect);
\r
340 HRESULT GetBackgroundContentRect(HDC hdc,
\r
341 int iPartId, int iStateId, const RECT *pBoundingRect,
\r
342 RECT *pContentRect);
\r
343 HRESULT GetBackgroundExtent(HDC hdc,
\r
344 int iPartId, int iStateId, const RECT *pContentRect,
\r
345 RECT *pExtentRect);
\r
346 HRESULT GetPartSize(HDC hdc,
\r
347 int iPartId, int iStateId, RECT * pRect, enum THEMESIZE eSize, SIZE *psz);
\r
348 HRESULT GetTextExtent(HDC hdc,
\r
349 int iPartId, int iStateId, LPCWSTR pszText, int iCharCount,
\r
350 DWORD dwTextFlags, const RECT *pBoundingRect,
\r
351 RECT *pExtentRect);
\r
352 HRESULT GetTextMetrics(HDC hdc,
\r
353 int iPartId, int iStateId, TEXTMETRIC* ptm);
\r
354 HRESULT GetBackgroundRegion(HDC hdc,
\r
355 int iPartId, int iStateId, const RECT *pRect, HRGN *pRegion);
\r
356 HRESULT HitTestBackground(HDC hdc, int iPartId,
\r
357 int iStateId, DWORD dwOptions, const RECT *pRect, HRGN hrgn,
\r
358 POINT ptTest, WORD *pwHitTestCode);
\r
359 HRESULT DrawEdge(HDC hdc, int iPartId, int iStateId,
\r
360 const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect);
\r
361 HRESULT DrawIcon(HDC hdc, int iPartId,
\r
362 int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex);
\r
363 BOOL IsPartDefined(int iPartId,
\r
365 BOOL IsBackgroundPartiallyTransparent(
\r
366 int iPartId, int iStateId);
\r
367 HRESULT GetColor(int iPartId,
\r
368 int iStateId, int iPropId, COLORREF *pColor);
\r
369 HRESULT GetMetric(HDC hdc, int iPartId,
\r
370 int iStateId, int iPropId, int *piVal);
\r
371 HRESULT GetString(int iPartId,
\r
372 int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars);
\r
373 HRESULT GetBool(int iPartId,
\r
374 int iStateId, int iPropId, BOOL *pfVal);
\r
375 HRESULT GetInt(int iPartId,
\r
376 int iStateId, int iPropId, int *piVal);
\r
377 HRESULT GetEnumValue(int iPartId,
\r
378 int iStateId, int iPropId, int *piVal);
\r
379 HRESULT GetPosition(int iPartId,
\r
380 int iStateId, int iPropId, POINT *pPoint);
\r
381 HRESULT GetFont(HDC hdc, int iPartId,
\r
382 int iStateId, int iPropId, LOGFONT *pFont);
\r
383 HRESULT GetRect(int iPartId,
\r
384 int iStateId, int iPropId, RECT *pRect);
\r
385 HRESULT GetMargins(HDC hdc, int iPartId,
\r
386 int iStateId, int iPropId, RECT *prc, MARGINS *pMargins);
\r
387 HRESULT GetIntList(int iPartId,
\r
388 int iStateId, int iPropId, INTLIST *pIntList);
\r
389 HRESULT GetPropertyOrigin(int iPartId,
\r
390 int iStateId, int iPropId, enum PROPERTYORIGIN *pOrigin);
\r
391 static HRESULT SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,
\r
392 LPCWSTR pszSubIdList);
\r
393 HRESULT GetFilename(int iPartId,
\r
394 int iStateId, int iPropId, LPWSTR pszThemeFileName, int cchMaxBuffChars);
\r
395 COLORREF GetSysColor(int iColorId);
\r
396 HBRUSH GetSysColorBrush(int iColorId);
\r
397 BOOL GetSysBool(int iBoolId);
\r
398 int GetSysSize(int iSizeId);
\r
399 HRESULT GetSysFont(int iFontId, LOGFONT *plf);
\r
400 HRESULT GetSysString(int iStringId,
\r
401 LPWSTR pszStringBuff, int cchMaxStringChars);
\r
402 HRESULT GetSysInt(int iIntId, int *piValue);
\r
403 static BOOL IsActive();
\r
404 static BOOL IsAppThemed();
\r
405 static HTHEME GetWindowTheme(HWND hwnd);
\r
406 static HRESULT EnableDialogTexture(HWND hwnd, DWORD dwFlags);
\r
407 static BOOL IsDialogTextureEnabled(HWND hwnd);
\r
408 static DWORD GetAppProperties();
\r
409 static void SetAppProperties(DWORD dwFlags);
\r
410 static HRESULT GetCurrentName(
\r
411 LPWSTR pszThemeFileName, int cchMaxNameChars,
\r
412 LPWSTR pszColorBuff, int cchMaxColorChars,
\r
413 LPWSTR pszSizeBuff, int cchMaxSizeChars);
\r
414 static HRESULT GetDocumentationProperty(LPCWSTR pszThemeName,
\r
415 LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars);
\r
416 static HRESULT DrawParentBackground(HWND hwnd, HDC hdc, RECT* prc);
\r
417 static HRESULT EnableTheming(BOOL fEnable);
\r
420 CXPTheme(HTHEME hTheme);
\r
421 CXPTheme(HWND hwnd, LPCWSTR pszClassList);
\r
423 void Attach(HTHEME hTheme);
\r
425 operator HTHEME() const;
\r
426 bool operator!() const;
\r
428 static void Release(void);
\r
429 static BOOL IsAvailable();
\r
431 #pragma warning(pop)
\r