Go to the source code of this file.
◆ DCX_USESTYLE
#define DCX_USESTYLE 0x00010000 |
◆ CreateWindowHelper()
static HWND CreateWindowHelper |
( |
PSZ |
pszClassName, |
|
|
PSZ |
pszTitle |
|
) |
| |
|
static |
Definition at line 54 of file GetDCEx.c.
57{
59 pszTitle,
63 100,
64 100,
67 0,
69}
#define WS_OVERLAPPEDWINDOW
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Referenced by Test_GetDCEx_Cached(), Test_GetDCEx_CS_CLASSDC(), Test_GetDCEx_CS_Mixed(), Test_GetDCEx_CS_OWNDC(), and Test_GetDCEx_CS_SwitchedStyle().
◆ RegisterClassHelper()
◆ START_TEST()
Definition at line 473 of file GetDCEx.c.
474{
481}
static void Test_GetDCEx_Cached()
static void Test_GetDCEx_CS_Mixed()
static void Test_GetDCEx_CS_OWNDC()
static void Test_GetDCEx_CS_SwitchedStyle()
void Test_GetDCEx_Params()
static void Test_GetDCEx_CS_CLASSDC()
◆ Test_GetDCEx_Cached()
static void Test_GetDCEx_Cached |
( |
| ) |
|
|
static |
Definition at line 73 of file GetDCEx.c.
74{
75 static const PSTR pszClassName =
"TestClass_Cached";
80
82 ok(atomClass != 0,
"Failed to register class\n");
83
86
92
97
100
104
108
112
118
122 ok(
hdc2 !=
hdc1,
"Expected a different DC\n");
125
130 ok(
hdc2 !=
hdc1,
"Expected a different DC\n");
133
135
138 "UnregisterClass failed");
139}
static LRESULT CALLBACK WndProc(_In_ HWND hwnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
static HWND CreateWindowHelper(PSZ pszClassName, PSZ pszTitle)
static ATOM RegisterClassHelper(PSTR pszClassName, UINT style, WNDPROC pfnWndProc)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
BOOL WINAPI DestroyWindow(_In_ HWND)
Referenced by START_TEST().
◆ Test_GetDCEx_CS_CLASSDC()
static void Test_GetDCEx_CS_CLASSDC |
( |
| ) |
|
|
static |
Definition at line 204 of file GetDCEx.c.
205{
206 static const PSTR pszClassName =
"TestClass_CS_CLASSDC";
210
211
213 ok(atomClass != 0,
"Failed to register class\n");
214
216 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
217
218
219
220
221
228
229
233
235 ok(hwnd2 !=
NULL,
"Failed to create hwnd2\n");
236
237
240
241
245
247
251 "UnregisterClass failed");
252}
Referenced by START_TEST().
◆ Test_GetDCEx_CS_Mixed()
static void Test_GetDCEx_CS_Mixed |
( |
| ) |
|
|
static |
Definition at line 256 of file GetDCEx.c.
257{
258 static const PSTR pszClassName =
"TestClass_CS_Mixed";
260 HWND hwnd1,hwnd2, hwnd3;
262
263
265 ok(atomClass != 0,
"Failed to register class\n");
266
267
269 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
270
271
273 "class style not set\n");
274
275
279
280
284
285
289
290
292 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
293
294
299
300
302 ok(hdc3 ==
hdc2,
"Expected the own DC, got %p\n", hdc3);
304
305
308
309
311 ok(hdc3 ==
hdc2,
"Expected the own DC, got %p\n", hdc3);
313
314
317
318
320 ok(hdc3 !=
NULL,
"GetDCEx failed\n");
321 ok(hdc3 !=
hdc1,
"Expected different DC, got class DC\n");
322 ok(hdc3 !=
hdc2,
"Expected different DC, got own DC\n");
324
325
327 ok(hdc3 !=
NULL,
"GetDCEx failed\n");
328 ok(hdc3 !=
hdc1,
"Expected different DC, got class DC\n");
329 ok(hdc3 ==
hdc2,
"Expected the own DC, got %p\n", hdc3);
331
332
335
337 ok(hwnd3 !=
NULL,
"Failed to create hwnd1\n");
338
339
343
344
347
348
350 ok(hdc3 ==
hdc2,
"Expected the same DC, got %p\n", hdc3);
352
353
355 ok(hdc3 ==
hdc2,
"Expected the same DC, got %p\n", hdc3);
357
358
361
362
364 ok(hdc3 ==
hdc2,
"Expected the same DC, got %p\n", hdc3);
366
367
369 ok(hdc3 ==
hdc2,
"Expected the same DC, got %p\n", hdc3);
371
372
377 "UnregisterClass failed\n");
378
379
381 ok(atomClass != 0,
"Failed to register class\n");
382
384 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
385
386
390
391
394
395
397 ok(hwnd2 !=
NULL,
"Failed to create hwnd1\n");
398
399
404
405
409 "UnregisterClass failed\n");
410}
Referenced by START_TEST().
◆ Test_GetDCEx_CS_OWNDC()
static void Test_GetDCEx_CS_OWNDC |
( |
| ) |
|
|
static |
Definition at line 143 of file GetDCEx.c.
144{
145 static const PSTR pszClassName =
"TestClass_CS_OWNDC";
149
150
152 ok(atomClass != 0,
"Failed to register class\n");
153
156
164
168
170 ok(
hdc2 !=
hdc1,
"Expected a different DC\n");
172
176
177
182
183
188
189
194
196
199 "UnregisterClass failed");
200}
Referenced by START_TEST().
◆ Test_GetDCEx_CS_SwitchedStyle()
static void Test_GetDCEx_CS_SwitchedStyle |
( |
| ) |
|
|
static |
Definition at line 414 of file GetDCEx.c.
415{
416 static const PSTR pszClassName =
"TestClass_CS_SwitchedStyle";
420
421
423 ok(atomClass != 0,
"Failed to register class\n");
424
425
427 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
429 ok(hwnd2 !=
NULL,
"Failed to create hwnd2\n");
430
431
437
438
441
442
446
447
448
450
451
453 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
456 ok(
hdc1 !=
hdc2,
"Should get different DC\n");
457
458
461
462
465 ok(
hdc2 == hdcClass,
"Expected class DC\n");
466
470 "UnregisterClass failed\n");
471}
Referenced by START_TEST().
◆ Test_GetDCEx_Params()
void Test_GetDCEx_Params |
( |
| ) |
|
◆ WndProc()