10#define TEST_CLASS_NAME L"ScrollBarRedraw"
11#define TEST_WINDOW_TITLE L"ScrollBarRedraw"
15#define TEST_COLOR_COUNT 16
20 RGB(0x00, 0x00, 0x00),
21 RGB(0x00, 0x00, 0x80),
22 RGB(0x00, 0x80, 0x00),
23 RGB(0x00, 0x80, 0x80),
24 RGB(0x80, 0x00, 0x00),
25 RGB(0x80, 0x00, 0x80),
26 RGB(0x80, 0x80, 0x00),
27 RGB(0xC0, 0xC0, 0xC0),
28 RGB(0x80, 0x80, 0x80),
29 RGB(0x00, 0x00, 0xFF),
30 RGB(0x00, 0xFF, 0x00),
31 RGB(0x00, 0xFF, 0xFF),
32 RGB(0xFF, 0x00, 0x00),
33 RGB(0xFF, 0x00, 0xFF),
34 RGB(0xFF, 0xFF, 0x00),
61#define FSM_STEP_PERIOD_MS 250
118 Class.style = ClassStyle;
120 Class.cbClsExtra = 0;
121 Class.cbWndExtra = 0;
127 Class.lpszClassName = ClassName;
131 skip(
"Failed to register window class '%ls', code: %ld\n",
149 skip(
"Failed to create window of class '%ls', code: %ld\n",
168 skip(
"Failed to initialize colors and solid color brushes\n");
172 trace(
"Running test without specifying either CS_HREDRAW or CS_HREDRAW\n");
179 trace(
"Running test with CS_HREDRAW\n");
186 trace(
"Running test with CS_VREDRAW\n");
193 trace(
"Running test with both CS_HREDRAW and CS_VREDRAW\n");
200 trace(
"Test complete\n");
208 ScrollInfo.
cbSize =
sizeof(ScrollInfo);
223 ScrollInfo.
cbSize =
sizeof(ScrollInfo);
238 ScrollInfo.
cbSize =
sizeof(ScrollInfo);
253 ScrollInfo.
cbSize =
sizeof(ScrollInfo);
275 skip(
"Failed to get device context\n");
289 skip(
"Failed to get window color\n");
311 "CS_HREDRAW specified, but appearence of vertical scroll bar"
312 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
318 "CS_HREDRAW not specified, but appearence of vertical scroll bar"
319 " triggered unneccessary redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
331 "CS_HREDRAW specified, but disappearence of vertical scroll bar"
332 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
338 "CS_HREDRAW not specified, but disappearence of vertical scroll bar"
339 " triggered unneccessary redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
351 "CS_VREDRAW specified, but appearence of horizontal scroll bar"
352 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
358 "CS_VREDRAW not specified, but appearence of horizontal scroll bar"
359 " triggered unneccessary redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
371 "CS_VREDRAW specified, but disappearence of horizontal scroll bar"
372 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
378 "CS_VREDRAW not specified, but disappearence of horizontal scroll bar"
379 " triggered unneccessary redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
393 "CS_HREDRAW or CS_VREDRAW specified, but appearence of both scroll bars"
394 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
400 "Neither CS_HREDRAW nor CS_VREDRAW specified, but appearence"
401 " of both scroll bars triggered unneccessary redraw,"
402 " PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
416 "CS_HREDRAW or CS_VREDRAW specified, but disappearence of both scroll bars"
417 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
423 "Neither CS_HREDRAW nor CS_VREDRAW specified, but disappearence"
424 " of both scroll bars triggered unneccessary redraw,"
425 " PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
437 "CS_HREDRAW specified, but horizontal window shrinkage"
438 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
444 "CS_HREDRAW not specified, but horizontal window shrinkage"
445 " triggered unneccessary redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
457 "CS_HREDRAW specified, but horizontal window expansion"
458 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
464 "CS_HREDRAW not specified, but horizontal window expansion"
465 " triggered unneccessary redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
477 "CS_VREDRAW specified, but vertical window shrinkage"
478 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
484 "CS_VREDRAW not specified, but vertical window shrinkage"
485 " triggered unneccessary redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
497 "CS_VREDRAW specified, but vertical window expansion"
498 " didn't trigger redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
504 "CS_VREDRAW not specified, but vertical window expansion"
505 " triggered unneccessary redraw, PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
518 "CS_HREDRAW or CS_VREDRAW specified, but combined"
519 " vertical/horizontal shrinkage didn't trigger redraw,"
520 " PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
526 "Neither CS_HREDRAW nor CS_VREDRAW specified, but combined"
527 " vertical/horizontal shrinkage triggered unneccessary redraw,"
528 " PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
541 "CS_HREDRAW or CS_VREDRAW specified, but combined"
542 " vertical/horizontal expansion didn't trigger redraw,"
543 " PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
549 "Neither CS_HREDRAW nor CS_VREDRAW specified, but combined"
550 " vertical/horizontal expansion triggered unneccessary redraw,"
551 " PrevColor: 0x%.8lX, Color: 0x%.8lX\n",
576 skip(
"Failed to get device context\n");
587 skip(
"Failed to create drawing region\n");
595 skip(
"Failed to paint the window\n");
626 skip(
"Failed to retrieve client area dimensions, code: %ld\n",
GetLastError());
645 trace(
"OrigWidth: %d, OrigHeight: %d, SmallWidth: %d, SmallHeight: %d\n",
676 if (NewWidth != 0 && NewHeight != 0 &&
684 trace(
"New window size: %d x %d, new color: 0x%.8lX\n",
712 skip(
"Window closed before test concluded, FsmState: %d, FSM_STATE_END: %d.\n",
718 skip(
"Window closed before test began.\n");
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
static const WCHAR Message[]
unsigned __int3264 UINT_PTR
#define WS_OVERLAPPEDWINDOW
TW_UINT32 TW_UINT16 TW_UINT16 MSG
DWORD WINAPI GetLastError(void)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI FillRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define GCLP_HBRBACKGROUND