10#define DCX_USESTYLE 0x00010000
75 static const PSTR pszClassName =
"TestClass_Cached";
82 ok(atomClass != 0,
"Failed to register class\n");
122 ok(
hdc2 !=
hdc1,
"Expected a different DC\n");
130 ok(
hdc2 !=
hdc1,
"Expected a different DC\n");
138 "UnregisterClass failed");
145 static const PSTR pszClassName =
"TestClass_CS_OWNDC";
152 ok(atomClass != 0,
"Failed to register class\n");
170 ok(
hdc2 !=
hdc1,
"Expected a different DC\n");
199 "UnregisterClass failed");
206 static const PSTR pszClassName =
"TestClass_CS_CLASSDC";
213 ok(atomClass != 0,
"Failed to register class\n");
216 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
235 ok(hwnd2 !=
NULL,
"Failed to create hwnd2\n");
251 "UnregisterClass failed");
258 static const PSTR pszClassName =
"TestClass_CS_Mixed";
260 HWND hwnd1,hwnd2, hwnd3;
265 ok(atomClass != 0,
"Failed to register class\n");
269 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
273 "class style not set\n");
292 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
302 ok(hdc3 ==
hdc2,
"Expected the own DC, got %p\n", hdc3);
311 ok(hdc3 ==
hdc2,
"Expected the own DC, got %p\n", hdc3);
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");
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);
337 ok(hwnd3 !=
NULL,
"Failed to create hwnd1\n");
350 ok(hdc3 ==
hdc2,
"Expected the same DC, got %p\n", hdc3);
355 ok(hdc3 ==
hdc2,
"Expected the same DC, got %p\n", hdc3);
364 ok(hdc3 ==
hdc2,
"Expected the same DC, got %p\n", hdc3);
369 ok(hdc3 ==
hdc2,
"Expected the same DC, got %p\n", hdc3);
377 "UnregisterClass failed\n");
381 ok(atomClass != 0,
"Failed to register class\n");
384 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
397 ok(hwnd2 !=
NULL,
"Failed to create hwnd1\n");
409 "UnregisterClass failed\n");
416 static const PSTR pszClassName =
"TestClass_CS_SwitchedStyle";
423 ok(atomClass != 0,
"Failed to register class\n");
427 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
429 ok(hwnd2 !=
NULL,
"Failed to create hwnd2\n");
453 ok(hwnd1 !=
NULL,
"Failed to create hwnd1\n");
456 ok(
hdc1 !=
hdc2,
"Should get different DC\n");
465 ok(
hdc2 == hdcClass,
"Expected class DC\n");
470 "UnregisterClass failed\n");
static void Test_GetDCEx_Cached()
static LRESULT CALLBACK WndProc(_In_ HWND hwnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
static void Test_GetDCEx_CS_Mixed()
static void Test_GetDCEx_CS_OWNDC()
static void Test_GetDCEx_CS_SwitchedStyle()
void Test_GetDCEx_Params()
static HWND CreateWindowHelper(PSZ pszClassName, PSZ pszTitle)
static ATOM RegisterClassHelper(PSTR pszClassName, UINT style, WNDPROC pfnWndProc)
static void Test_GetDCEx_CS_CLASSDC()
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
#define WS_OVERLAPPEDWINDOW
HGDIOBJ WINAPI GetStockObject(_In_ int)
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)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI DestroyWindow(_In_ HWND)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)