1 /* Unit test suite for uxtheme API functions
3 * Copyright 2006 Paul Vriens
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #include "wine/test.h"
29 static HRESULT (WINAPI
* pCloseThemeData
)(HTHEME
);
30 static HRESULT (WINAPI
* pGetCurrentThemeName
)(LPWSTR
, int, LPWSTR
, int, LPWSTR
, int);
31 static HTHEME (WINAPI
* pGetWindowTheme
)(HWND
);
32 static BOOL (WINAPI
* pIsAppThemed
)(VOID
);
33 static BOOL (WINAPI
* pIsThemeActive
)(VOID
);
34 static BOOL (WINAPI
* pIsThemePartDefined
)(HTHEME
, int, int);
35 static HTHEME (WINAPI
* pOpenThemeData
)(HWND
, LPCWSTR
);
36 static HTHEME (WINAPI
* pOpenThemeDataEx
)(HWND
, LPCWSTR
, DWORD
);
37 static HRESULT (WINAPI
* pSetWindowTheme
)(HWND
, LPCWSTR
, LPCWSTR
);
39 static HMODULE hUxtheme
= 0;
41 #define UXTHEME_GET_PROC(func) p ## func = (void*)GetProcAddress(hUxtheme, #func);
43 static BOOL
InitFunctionPtrs(void)
45 hUxtheme
= LoadLibraryA("uxtheme.dll");
47 trace("Could not load uxtheme.dll\n");
52 UXTHEME_GET_PROC(CloseThemeData
)
53 UXTHEME_GET_PROC(GetCurrentThemeName
)
54 UXTHEME_GET_PROC(GetWindowTheme
)
55 UXTHEME_GET_PROC(IsAppThemed
)
56 UXTHEME_GET_PROC(IsThemeActive
)
57 UXTHEME_GET_PROC(IsThemePartDefined
)
58 UXTHEME_GET_PROC(OpenThemeData
)
59 UXTHEME_GET_PROC(OpenThemeDataEx
)
60 UXTHEME_GET_PROC(SetWindowTheme
)
62 /* The following functions should be available, if not return FALSE. The Vista functions will
63 * be checked (at some point in time) within the single tests if needed. All used functions for
64 * now are present on WinXP, W2K3 and Wine.
66 if (!pCloseThemeData
|| !pGetCurrentThemeName
||
67 !pGetWindowTheme
|| !pIsAppThemed
||
68 !pIsThemeActive
|| !pIsThemePartDefined
||
69 !pOpenThemeData
|| !pSetWindowTheme
)
71 FreeLibrary(hUxtheme
);
78 static void test_IsThemed(void)
84 bThemeActive
= pIsThemeActive();
85 trace("Theming is %s\n", (bThemeActive
) ? "active" : "inactive");
87 bAppThemed
= pIsAppThemed();
88 trace("Test executable is %s\n", (bAppThemed
) ? "themed" : "not themed");
90 SetLastError(0xdeadbeef);
91 bTPDefined
= pIsThemePartDefined(NULL
, 0 , 0);
92 ok( bTPDefined
== FALSE
, "Expected FALSE\n");
93 ok( GetLastError() == E_HANDLE
,
94 "Expected E_HANDLE, got 0x%08x\n",
98 static void test_GetWindowTheme(void)
104 SetLastError(0xdeadbeef);
105 hTheme
= pGetWindowTheme(NULL
);
106 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
108 ok( GetLastError() == E_HANDLE
,
109 "Expected E_HANDLE, got 0x%08x\n",
112 /* Only do the bare minimum to get a valid hwnd */
113 hWnd
= CreateWindowExA(0, "static", "", WS_POPUP
, 0,0,100,100,0, 0, 0, NULL
);
116 SetLastError(0xdeadbeef);
117 hTheme
= pGetWindowTheme(hWnd
);
118 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
119 ok( GetLastError() == 0xdeadbeef,
120 "Expected 0xdeadbeef, got 0x%08x\n",
123 bDestroyed
= DestroyWindow(hWnd
);
125 trace("Window %p couldn't be destroyed : 0x%08x\n",
126 hWnd
, GetLastError());
129 static void test_SetWindowTheme(void)
135 SetLastError(0xdeadbeef);
136 hRes
= pSetWindowTheme(NULL
, NULL
, NULL
);
139 ok( hRes
== E_HANDLE
, "Expected E_HANDLE, got 0x%08x\n", hRes
);
140 ok( GetLastError() == 0xdeadbeef,
141 "Expected 0xdeadbeef, got 0x%08x\n",
145 /* Only do the bare minimum to get a valid hwnd */
146 hWnd
= CreateWindowExA(0, "static", "", WS_POPUP
, 0,0,100,100,0, 0, 0, NULL
);
149 SetLastError(0xdeadbeef);
150 hRes
= pSetWindowTheme(hWnd
, NULL
, NULL
);
151 ok( hRes
== S_OK
, "Expected S_OK, got 0x%08x\n", hRes
);
152 ok( GetLastError() == 0xdeadbeef,
153 "Expected 0xdeadbeef, got 0x%08x\n",
156 bDestroyed
= DestroyWindow(hWnd
);
158 trace("Window %p couldn't be destroyed : 0x%08x\n",
159 hWnd
, GetLastError());
162 static void test_OpenThemeData(void)
164 HTHEME hTheme
, hTheme2
;
171 WCHAR szInvalidClassList
[] = {'D','E','A','D','B','E','E','F', 0 };
172 WCHAR szButtonClassList
[] = {'B','u','t','t','o','n', 0 };
173 WCHAR szButtonClassList2
[] = {'b','U','t','T','o','N', 0 };
174 WCHAR szClassList
[] = {'B','u','t','t','o','n',';','L','i','s','t','B','o','x', 0 };
176 bThemeActive
= pIsThemeActive();
179 SetLastError(0xdeadbeef);
180 hTheme
= pOpenThemeData(NULL
, NULL
);
181 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
182 ok( GetLastError() == E_POINTER
,
183 "Expected GLE() to be E_POINTER, got 0x%08x\n",
186 /* A NULL hWnd and an invalid classlist */
187 SetLastError(0xdeadbeef);
188 hTheme
= pOpenThemeData(NULL
, szInvalidClassList
);
189 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
191 ok( GetLastError() == E_PROP_ID_UNSUPPORTED
,
192 "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
195 SetLastError(0xdeadbeef);
196 hTheme
= pOpenThemeData(NULL
, szClassList
);
199 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
201 ok( GetLastError() == ERROR_SUCCESS
,
202 "Expected ERROR_SUCCESS, got 0x%08x\n",
207 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
209 ok( GetLastError() == E_PROP_ID_UNSUPPORTED
,
210 "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
214 /* Only do the bare minimum to get a valid hdc */
215 hWnd
= CreateWindowExA(0, "static", "", WS_POPUP
, 0,0,100,100,0, 0, 0, NULL
);
218 SetLastError(0xdeadbeef);
219 hTheme
= pOpenThemeData(hWnd
, NULL
);
220 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
221 ok( GetLastError() == E_POINTER
,
222 "Expected GLE() to be E_POINTER, got 0x%08x\n",
225 SetLastError(0xdeadbeef);
226 hTheme
= pOpenThemeData(hWnd
, szInvalidClassList
);
227 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
229 ok( GetLastError() == E_PROP_ID_UNSUPPORTED
,
230 "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
235 SetLastError(0xdeadbeef);
236 hTheme
= pOpenThemeData(hWnd
, szButtonClassList
);
237 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
239 ok( GetLastError() == E_PROP_ID_UNSUPPORTED
,
240 "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
242 skip("No active theme, skipping rest of OpenThemeData tests\n");
246 /* Only do the next checks if we have an active theme */
248 SetLastError(0xdeadbeef);
249 hTheme
= pOpenThemeData(hWnd
, szButtonClassList
);
250 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
252 ok( GetLastError() == ERROR_SUCCESS
,
253 "Expected ERROR_SUCCESS, got 0x%08x\n",
256 /* Test with bUtToN instead of Button */
257 SetLastError(0xdeadbeef);
258 hTheme
= pOpenThemeData(hWnd
, szButtonClassList2
);
259 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
261 ok( GetLastError() == ERROR_SUCCESS
,
262 "Expected ERROR_SUCCESS, got 0x%08x\n",
265 SetLastError(0xdeadbeef);
266 hTheme
= pOpenThemeData(hWnd
, szClassList
);
267 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
269 ok( GetLastError() == ERROR_SUCCESS
,
270 "Expected ERROR_SUCCESS, got 0x%08x\n",
273 /* GetWindowTheme should return the last handle opened by OpenThemeData */
274 SetLastError(0xdeadbeef);
275 hTheme2
= pGetWindowTheme(hWnd
);
276 ok( hTheme
== hTheme2
, "Expected the same HTHEME handle (%p<->%p)\n",
278 ok( GetLastError() == 0xdeadbeef,
279 "Expected 0xdeadbeef, got 0x%08x\n",
282 SetLastError(0xdeadbeef);
283 hRes
= pCloseThemeData(hTheme
);
284 ok( hRes
== S_OK
, "Expected S_OK, got 0x%08x\n", hRes
);
285 ok( GetLastError() == 0xdeadbeef,
286 "Expected 0xdeadbeef, got 0x%08x\n",
289 /* Close a second time */
290 SetLastError(0xdeadbeef);
291 hRes
= pCloseThemeData(hTheme
);
292 ok( hRes
== S_OK
, "Expected S_OK, got 0x%08x\n", hRes
);
293 ok( GetLastError() == 0xdeadbeef,
294 "Expected 0xdeadbeef, got 0x%08x\n",
297 /* See if closing makes a difference for GetWindowTheme */
298 SetLastError(0xdeadbeef);
300 hTheme2
= pGetWindowTheme(hWnd
);
301 ok( hTheme
== hTheme2
, "Expected the same HTHEME handle (%p<->%p)\n",
303 ok( GetLastError() == 0xdeadbeef,
304 "Expected 0xdeadbeef, got 0x%08x\n",
307 SetLastError(0xdeadbeef);
308 bTPDefined
= pIsThemePartDefined(hTheme
, 0 , 0);
311 ok( bTPDefined
== FALSE
, "Expected FALSE\n");
312 ok( GetLastError() == ERROR_SUCCESS
,
313 "Expected ERROR_SUCCESS, got 0x%08x\n",
317 bDestroyed
= DestroyWindow(hWnd
);
319 trace("Window %p couldn't be destroyed : 0x%08x\n",
320 hWnd
, GetLastError());
323 static void test_OpenThemeDataEx(void)
330 WCHAR szInvalidClassList
[] = {'D','E','A','D','B','E','E','F', 0 };
331 WCHAR szButtonClassList
[] = {'B','u','t','t','o','n', 0 };
332 WCHAR szButtonClassList2
[] = {'b','U','t','T','o','N', 0 };
333 WCHAR szClassList
[] = {'B','u','t','t','o','n',';','L','i','s','t','B','o','x', 0 };
335 if (!pOpenThemeDataEx
)
337 win_skip("OpenThemeDataEx not available\n");
341 bThemeActive
= pIsThemeActive();
344 SetLastError(0xdeadbeef);
345 hTheme
= pOpenThemeDataEx(NULL
, NULL
, 0);
346 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
347 ok( GetLastError() == E_POINTER
,
348 "Expected GLE() to be E_POINTER, got 0x%08x\n",
351 /* A NULL hWnd and an invalid classlist without flags */
352 SetLastError(0xdeadbeef);
353 hTheme
= pOpenThemeDataEx(NULL
, szInvalidClassList
, 0);
354 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
356 ok( GetLastError() == E_PROP_ID_UNSUPPORTED
,
357 "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
360 SetLastError(0xdeadbeef);
361 hTheme
= pOpenThemeDataEx(NULL
, szClassList
, 0);
364 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
366 ok( GetLastError() == ERROR_SUCCESS
,
367 "Expected ERROR_SUCCESS, got 0x%08x\n",
372 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
374 ok( GetLastError() == E_PROP_ID_UNSUPPORTED
,
375 "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
379 /* Only do the bare minimum to get a valid hdc */
380 hWnd
= CreateWindowExA(0, "static", "", WS_POPUP
, 0,0,100,100,0, 0, 0, NULL
);
383 SetLastError(0xdeadbeef);
384 hTheme
= pOpenThemeDataEx(hWnd
, NULL
, 0);
385 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
386 ok( GetLastError() == E_POINTER
,
387 "Expected GLE() to be E_POINTER, got 0x%08x\n",
390 SetLastError(0xdeadbeef);
391 hTheme
= pOpenThemeDataEx(hWnd
, szInvalidClassList
, 0);
392 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
394 ok( GetLastError() == E_PROP_ID_UNSUPPORTED
,
395 "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
400 SetLastError(0xdeadbeef);
401 hTheme
= pOpenThemeDataEx(hWnd
, szButtonClassList
, 0);
402 ok( hTheme
== NULL
, "Expected a NULL return, got %p\n", hTheme
);
404 ok( GetLastError() == E_PROP_ID_UNSUPPORTED
,
405 "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
407 skip("No active theme, skipping rest of OpenThemeDataEx tests\n");
411 /* Only do the next checks if we have an active theme */
413 SetLastError(0xdeadbeef);
414 hTheme
= pOpenThemeDataEx(hWnd
, szButtonClassList
, 0);
415 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
417 ok( GetLastError() == ERROR_SUCCESS
,
418 "Expected ERROR_SUCCESS, got 0x%08x\n",
421 SetLastError(0xdeadbeef);
422 hTheme
= pOpenThemeDataEx(hWnd
, szButtonClassList
, OTD_FORCE_RECT_SIZING
);
423 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
425 ok( GetLastError() == ERROR_SUCCESS
,
426 "Expected ERROR_SUCCESS, got 0x%08x\n",
429 SetLastError(0xdeadbeef);
430 hTheme
= pOpenThemeDataEx(hWnd
, szButtonClassList
, OTD_NONCLIENT
);
431 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
433 ok( GetLastError() == ERROR_SUCCESS
,
434 "Expected ERROR_SUCCESS, got 0x%08x\n",
437 SetLastError(0xdeadbeef);
438 hTheme
= pOpenThemeDataEx(hWnd
, szButtonClassList
, 0x3);
439 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
441 ok( GetLastError() == ERROR_SUCCESS
,
442 "Expected ERROR_SUCCESS, got 0x%08x\n",
445 /* Test with bUtToN instead of Button */
446 SetLastError(0xdeadbeef);
447 hTheme
= pOpenThemeDataEx(hWnd
, szButtonClassList2
, 0);
448 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
450 ok( GetLastError() == ERROR_SUCCESS
,
451 "Expected ERROR_SUCCESS, got 0x%08x\n",
454 SetLastError(0xdeadbeef);
455 hTheme
= pOpenThemeDataEx(hWnd
, szClassList
, 0);
456 ok( hTheme
!= NULL
, "got NULL, expected a HTHEME handle\n");
458 ok( GetLastError() == ERROR_SUCCESS
,
459 "Expected ERROR_SUCCESS, got 0x%08x\n",
462 bDestroyed
= DestroyWindow(hWnd
);
464 trace("Window %p couldn't be destroyed : 0x%08x\n",
465 hWnd
, GetLastError());
468 static void test_GetCurrentThemeName(void)
472 WCHAR currentTheme
[MAX_PATH
];
473 WCHAR currentColor
[MAX_PATH
];
474 WCHAR currentSize
[MAX_PATH
];
476 bThemeActive
= pIsThemeActive();
479 SetLastError(0xdeadbeef);
480 hRes
= pGetCurrentThemeName(NULL
, 0, NULL
, 0, NULL
, 0);
482 ok( hRes
== S_OK
, "Expected S_OK, got 0x%08x\n", hRes
);
484 ok( hRes
== E_PROP_ID_UNSUPPORTED
, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
485 ok( GetLastError() == 0xdeadbeef,
486 "Expected 0xdeadbeef, got 0x%08x\n",
489 /* Number of characters given is 0 */
490 SetLastError(0xdeadbeef);
491 hRes
= pGetCurrentThemeName(currentTheme
, 0, NULL
, 0, NULL
, 0);
493 ok( hRes
== S_OK
|| broken(hRes
== E_FAIL
/* WinXP SP1 */), "Expected S_OK, got 0x%08x\n", hRes
);
495 ok( hRes
== E_PROP_ID_UNSUPPORTED
, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
496 ok( GetLastError() == 0xdeadbeef,
497 "Expected 0xdeadbeef, got 0x%08x\n",
500 SetLastError(0xdeadbeef);
501 hRes
= pGetCurrentThemeName(currentTheme
, 2, NULL
, 0, NULL
, 0);
504 ok(hRes
== HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER
) ||
505 broken(hRes
== E_FAIL
/* WinXP SP1 */),
506 "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got 0x%08x\n", hRes
);
508 ok( hRes
== E_PROP_ID_UNSUPPORTED
, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
509 ok( GetLastError() == 0xdeadbeef,
510 "Expected 0xdeadbeef, got 0x%08x\n",
513 /* The same is true if the number of characters is too small for Color and/or Size */
514 SetLastError(0xdeadbeef);
515 hRes
= pGetCurrentThemeName(currentTheme
, sizeof(currentTheme
) / sizeof(WCHAR
),
517 currentSize
, sizeof(currentSize
) / sizeof(WCHAR
));
520 ok(hRes
== HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER
) ||
521 broken(hRes
== E_FAIL
/* WinXP SP1 */),
522 "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got 0x%08x\n", hRes
);
524 ok( hRes
== E_PROP_ID_UNSUPPORTED
, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
525 ok( GetLastError() == 0xdeadbeef,
526 "Expected 0xdeadbeef, got 0x%08x\n",
529 /* Given number of characters is correct */
530 SetLastError(0xdeadbeef);
531 hRes
= pGetCurrentThemeName(currentTheme
, sizeof(currentTheme
) / sizeof(WCHAR
), NULL
, 0, NULL
, 0);
533 ok( hRes
== S_OK
, "Expected S_OK, got 0x%08x\n", hRes
);
535 ok( hRes
== E_PROP_ID_UNSUPPORTED
, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
536 ok( GetLastError() == 0xdeadbeef,
537 "Expected 0xdeadbeef, got 0x%08x\n",
540 /* Given number of characters for the theme name is too large */
541 SetLastError(0xdeadbeef);
542 hRes
= pGetCurrentThemeName(currentTheme
, sizeof(currentTheme
), NULL
, 0, NULL
, 0);
544 ok( hRes
== E_POINTER
|| hRes
== S_OK
, "Expected E_POINTER or S_OK, got 0x%08x\n", hRes
);
546 ok( hRes
== E_PROP_ID_UNSUPPORTED
||
547 hRes
== E_POINTER
, /* win2k3 */
548 "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
549 ok( GetLastError() == 0xdeadbeef,
550 "Expected 0xdeadbeef, got 0x%08x\n",
553 /* The too large case is only for the theme name, not for color name or size name */
554 SetLastError(0xdeadbeef);
555 hRes
= pGetCurrentThemeName(currentTheme
, sizeof(currentTheme
) / sizeof(WCHAR
),
556 currentColor
, sizeof(currentTheme
),
557 currentSize
, sizeof(currentSize
) / sizeof(WCHAR
));
559 ok( hRes
== S_OK
, "Expected S_OK, got 0x%08x\n", hRes
);
561 ok( hRes
== E_PROP_ID_UNSUPPORTED
, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
562 ok( GetLastError() == 0xdeadbeef,
563 "Expected 0xdeadbeef, got 0x%08x\n",
566 SetLastError(0xdeadbeef);
567 hRes
= pGetCurrentThemeName(currentTheme
, sizeof(currentTheme
) / sizeof(WCHAR
),
568 currentColor
, sizeof(currentTheme
) / sizeof(WCHAR
),
569 currentSize
, sizeof(currentSize
));
571 ok( hRes
== S_OK
, "Expected S_OK, got 0x%08x\n", hRes
);
573 ok( hRes
== E_PROP_ID_UNSUPPORTED
, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
574 ok( GetLastError() == 0xdeadbeef,
575 "Expected 0xdeadbeef, got 0x%08x\n",
579 SetLastError(0xdeadbeef);
580 hRes
= pGetCurrentThemeName(currentTheme
, sizeof(currentTheme
) / sizeof(WCHAR
),
581 currentColor
, sizeof(currentColor
) / sizeof(WCHAR
),
582 currentSize
, sizeof(currentSize
) / sizeof(WCHAR
));
584 ok( hRes
== S_OK
, "Expected S_OK, got 0x%08x\n", hRes
);
586 ok( hRes
== E_PROP_ID_UNSUPPORTED
, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes
);
587 ok( GetLastError() == 0xdeadbeef,
588 "Expected 0xdeadbeef, got 0x%08x\n",
592 static void test_CloseThemeData(void)
596 SetLastError(0xdeadbeef);
597 hRes
= pCloseThemeData(NULL
);
598 ok( hRes
== E_HANDLE
, "Expected E_HANDLE, got 0x%08x\n", hRes
);
599 ok( GetLastError() == 0xdeadbeef,
600 "Expected 0xdeadbeef, got 0x%08x\n",
606 if(!InitFunctionPtrs())
609 /* No real functional tests will be done (yet). The current tests
610 * only show input/return behaviour
613 /* IsThemeActive, IsAppThemed and IsThemePartDefined*/
614 trace("Starting test_IsThemed()\n");
618 trace("Starting test_GetWindowTheme()\n");
619 test_GetWindowTheme();
622 trace("Starting test_SetWindowTheme()\n");
623 test_SetWindowTheme();
625 /* OpenThemeData, a bit more functional now */
626 trace("Starting test_OpenThemeData()\n");
627 test_OpenThemeData();
629 /* OpenThemeDataEx */
630 trace("Starting test_OpenThemeDataEx()\n");
631 test_OpenThemeDataEx();
633 /* GetCurrentThemeName */
634 trace("Starting test_GetCurrentThemeName()\n");
635 test_GetCurrentThemeName();
638 trace("Starting test_CloseThemeData()\n");
639 test_CloseThemeData();
641 FreeLibrary(hUxtheme
);