#include <apitest.h>
#include <stdio.h>
#include <windows.h>
#include <uxtheme.h>
Go to the source code of this file.
◆ START_TEST()
Definition at line 80 of file SetWindowTheme.c.
81{
83
84 hwnd =
CreateWindowW(
L"button",
L"Test window",
WS_OVERLAPPEDWINDOW |
WS_VISIBLE, 100, 100, 200, 200, 0,
NULL,
NULL,
NULL);
85 ok (
hwnd !=
NULL,
"Expected CreateWindowW to succeed\n");
86
89
91}
void TestTheme(HWND hwnd)
void TestParams(HWND hwnd)
#define WS_OVERLAPPEDWINDOW
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI DestroyWindow(_In_ HWND)
◆ TestParams()
Definition at line 13 of file SetWindowTheme.c.
14{
16
19
22
24 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
25
27 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
28
30 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
31
33 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
34
36 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
37}
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Referenced by START_TEST().
◆ TestTheme()
Definition at line 39 of file SetWindowTheme.c.
40{
43
45 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
46
49 ok (htheme1 !=
NULL,
"OpenThemeData failed\n");
50 else
51 skip(
"Theme not active\n");
52
54 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
55
57 ok (htheme2 ==
NULL,
"Expected OpenThemeData to fail\n");
58
60 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
61
63 ok (htheme2 ==
NULL,
"Expected OpenThemeData to fail\n");
64
66 ok (
hr ==
S_OK,
"Expected S_OK got 0x%lx error\n",
hr);
67
70 {
71 ok (htheme2 !=
NULL,
"OpenThemeData failed\n");
72 ok(htheme1 != htheme2,
"Expected different theme data\n");
73 }
74 else
75 {
76 skip(
"Theme not active\n");
77 }
78}
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
BOOL WINAPI IsThemeActive(void)
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
Referenced by START_TEST().