Something went wrong. Try again.
Reactos
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187/* * PROJECT: ReactOS API tests * LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+) * PURPOSE: Test for RedrawWindow * COPYRIGHT: Copyright 2018 Thomas Faber <thomas.faber@reactos.org> * Copyright 2024 Tomáš Veselý <turican0@gmail.com> */
#include "precomp.h"
static DWORD dwThreadId;static BOOL got_paint;
BOOL resultWmEraseGnd = FALSE;BOOL resultWmNcPaint = FALSE;int paintIndex = 0;const wchar_t CHILD_CLASS_NAME[] = L"ChildWindowClass";
staticLRESULTCALLBACKWndProc( _In_ HWND hWnd, _In_ UINT message, _In_ WPARAM wParam, _In_ LPARAM lParam){ disable_success_count ok(GetCurrentThreadId() == dwThreadId, "Thread 0x%lx instead of 0x%lx\n", GetCurrentThreadId(), dwThreadId); if (message == WM_PAINT) { got_paint = TRUE; } return DefWindowProcW(hWnd, message, wParam, lParam);}
void GetMessageRedrawWindowTest(void){ HWND hWnd; MSG msg; HRGN hRgn; BOOL ret; int i;
SetCursorPos(0,0);
dwThreadId = GetCurrentThreadId(); RegisterSimpleClass(WndProc, L"CreateTest");
hWnd = CreateWindowExW(0, L"CreateTest", NULL, 0, 10, 10, 20, 20, NULL, NULL, 0, NULL); ok(hWnd != NULL, "CreateWindow failed\n");
ShowWindow(hWnd, SW_SHOW);
while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { DispatchMessageW(&msg); }
ok(got_paint == TRUE, "Did not process WM_PAINT message\n"); got_paint = FALSE;
hRgn = CreateRectRgn(0, 0, 1, 1); ok(hRgn != NULL, "CreateRectRgn failed\n"); ret = RedrawWindow(hWnd, NULL, hRgn, RDW_INTERNALPAINT | RDW_INVALIDATE); ok(ret == TRUE, "RedrawWindow failed\n");
i = 0; while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { RECORD_MESSAGE(1, msg.message, POST, 0, 0); if (msg.message == WM_PAINT) { i++; if (i == 10) { ok(got_paint == FALSE, "Received unexpected WM_PAINT message\n"); } } if (msg.message != WM_PAINT || i >= 10) { DispatchMessageW(&msg); } }
ok(i == 10, "Received %d WM_PAINT messages\n", i); ok(got_paint == TRUE, "Did not process WM_PAINT message\n");
TRACE_CACHE();
DeleteObject(hRgn); DestroyWindow(hWnd);}
void DrawContent(HDC hdc, RECT* rect, COLORREF color){ HBRUSH hBrush = CreateSolidBrush(color); FillRect(hdc, rect, hBrush); DeleteObject(hBrush);
SetBkMode(hdc, TRANSPARENT); SetTextColor(hdc, RGB(255, 255, 255)); DrawTextW(hdc, L"Test RedrawWindow", -1, rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);}
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch (uMsg) { case WM_DESTROY: { PostQuitMessage(0); return 0; } case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); RECT rect; GetClientRect(hwnd, &rect); DrawContent(hdc, &rect, RGB(0, 255, 0)); EndPaint(hwnd, &ps); paintIndex++; return 0; } case WM_ERASEBKGND: { if(paintIndex != 0) resultWmEraseGnd = TRUE; return 0; } case WM_NCPAINT: { if (paintIndex != 0) resultWmNcPaint = TRUE; return 0; } } return DefWindowProcW(hwnd, uMsg, wParam, lParam);}
LRESULT CALLBACK ChildWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch (uMsg) { case WM_SYNCPAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); HBRUSH brush = CreateSolidBrush(RGB(0, 0, 255)); FillRect(hdc, &ps.rcPaint, brush); DeleteObject(brush); EndPaint(hwnd, &ps); break; } case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); HBRUSH brush = CreateSolidBrush(RGB(0, 0, 255)); FillRect(hdc, &ps.rcPaint, brush); DeleteObject(brush); EndPaint(hwnd, &ps); break; } case WM_DESTROY: { PostQuitMessage(0); return 0; } } return DefWindowProcW(hwnd, uMsg, wParam, lParam);}
typedef struct STRUCT_TestRedrawWindow{ const wchar_t* testName; DWORD flags; BOOL useRegion; RECT regRect; BOOL useRect; RECT rectRect; BOOL forcePaint; BOOL redrawResult; int testPixelPre1x; int testPixelPre1y; int testPixelPre2x; int testPixelPre2y; int testPixelPost1x; int testPixelPost1y; int testPixelPost2x; int testPixelPost2y; int testChild; COLORREF resultColorPre1; COLORREF resultColorPre2; COLORREF resultColorPost1; COLORREF resultColorPost2; RECT resultUpdateRect; BOOL resultNeedsUpdate; BOOL resultRedraw; BOOL resultWmEraseGnd; BOOL resultWmNcPaint; int resultPaintIndex;} STRUCT_TestRedrawWindow;
typedef struct STRUCT_TestRedrawWindowCompare{ COLORREF resultColorPre1; COLORREF resultColorPre2; COLORREF resultColorPost1; COLORREF resultColorPost2; RECT resultUpdateRect; BOOL resultNeedsUpdate; BOOL resultWmEraseGnd; BOOL resultWmNcPaint; int resultPaintIndex;} STRUCT_TestRedrawWindowCompare;
void ServeSomeMessages(int messageTime, int messageCount){ DWORD startTime;
MSG msg = { 0 }; startTime = GetTickCount(); while (GetTickCount() - startTime < messageTime * messageCount) { if (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessageW(&msg); } else { Sleep(messageTime); } }}
void TestRedrawWindow(STRUCT_TestRedrawWindow* ptestRW){ DWORD style; int width; int height; HWND hChildWnd = NULL; HRGN RgnUpdate; RECT* prect;
resultWmEraseGnd = FALSE; resultWmNcPaint = FALSE; paintIndex = 0;
WNDCLASSW wc = { 0 }; wc.lpfnWndProc = WindowProc; wc.hInstance = GetModuleHandle(NULL); wc.lpszClassName = ptestRW->testName; RegisterClassW(&wc); RECT rectWin = { 0, 0, 700, 500 }; style = WS_OVERLAPPEDWINDOW; AdjustWindowRectEx(&rectWin, style, FALSE, 0); width = rectWin.right - rectWin.left; height = rectWin.bottom - rectWin.top; HWND hwnd = CreateWindowExW(0, wc.lpszClassName, wc.lpszClassName, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, GetModuleHandle(NULL), NULL); if (hwnd == NULL) return; MoveWindow(hwnd, 10, 10, width, height, TRUE);
ShowWindow(hwnd, SW_SHOW); if(!ptestRW->testChild) UpdateWindow(hwnd);
if (ptestRW->testChild) { WNDCLASSW wcChild = { 0 }; wcChild.lpfnWndProc = ChildWindowProc; wcChild.hInstance = GetModuleHandle(NULL); wcChild.lpszClassName = CHILD_CLASS_NAME; RegisterClassW(&wcChild);
hChildWnd = CreateWindowExW( 0, CHILD_CLASS_NAME, L"Child Window", WS_CHILD | WS_VISIBLE, 10, 10, 200, 200, hwnd, NULL, GetModuleHandle(NULL), NULL ); if (hChildWnd == NULL) return; }
HDC hdc = GetDC(hwnd); RECT drect = { 0, 0, 700, 500 }; DrawContent(hdc, &drect, RGB(255, 0, 0)); ReleaseDC(hwnd, hdc);
RgnUpdate = NULL; if (ptestRW->useRegion) { RgnUpdate = CreateRectRgn(ptestRW->regRect.left, ptestRW->regRect.top, ptestRW->regRect.right, ptestRW->regRect.bottom); }
prect = NULL; if (ptestRW->useRect) { prect = &ptestRW->rectRect; }
if (ptestRW->testChild) { ServeSomeMessages(10, 10); }
ptestRW->resultRedraw = RedrawWindow(hwnd, prect, RgnUpdate, ptestRW->flags);
if (ptestRW->testChild) { ServeSomeMessages(10, 10); }
hdc = GetDC(hwnd); ptestRW->resultColorPre1 = GetPixel(hdc, ptestRW->testPixelPre1x, ptestRW->testPixelPre1y); ptestRW->resultColorPre2 = GetPixel(hdc, ptestRW->testPixelPre2x, ptestRW->testPixelPre2y); ReleaseDC(hwnd, hdc);
ptestRW->resultNeedsUpdate = GetUpdateRect(hwnd, &ptestRW->resultUpdateRect, FALSE);
if (ptestRW->forcePaint) { UpdateWindow(hwnd); }
hdc = GetDC(hwnd); ptestRW->resultColorPost1 = GetPixel(hdc, ptestRW->testPixelPost1x, ptestRW->testPixelPost1y); ptestRW->resultColorPost2 = GetPixel(hdc, ptestRW->testPixelPost2x, ptestRW->testPixelPost2y); ReleaseDC(hwnd, hdc);
ptestRW->resultWmEraseGnd = resultWmEraseGnd; ptestRW->resultWmNcPaint = resultWmNcPaint; ptestRW->resultPaintIndex = paintIndex;
if (RgnUpdate) DeleteObject(RgnUpdate);
if (hChildWnd != NULL) DestroyWindow(hChildWnd); if (hwnd != NULL) DestroyWindow(hwnd);}
UINT TestRedrawWindow2(STRUCT_TestRedrawWindow* ptestRW, STRUCT_TestRedrawWindowCompare* ptestRWcompare){ UINT countErrors = 0;
TestRedrawWindow(ptestRW);
if (ptestRW->resultRedraw) { if (ptestRWcompare->resultColorPre1 != ptestRW->resultColorPre1) { trace("DIFFERENCE-resultColorPre1 0x%06x 0x%06x\n", (int)ptestRW->resultColorPre1, (int)ptestRWcompare->resultColorPre1); countErrors++; } if (ptestRWcompare->resultColorPre2 != ptestRW->resultColorPre2) { trace("DIFFERENCE-resultColorPre2 0x%06x 0x%06x\n", (int)ptestRW->resultColorPre2, (int)ptestRWcompare->resultColorPre2); countErrors++; } if (ptestRWcompare->resultColorPost1 != ptestRW->resultColorPost1) { trace("DIFFERENCE-resultColorPost1 0x%06x 0x%06x\n", (int)ptestRW->resultColorPost1, (int)ptestRWcompare->resultColorPost1); countErrors++; } if (ptestRWcompare->resultColorPost2 != ptestRW->resultColorPost2) { trace("DIFFERENCE-resultColorPost2 0x%06x 0x%06x\n", (int)ptestRW->resultColorPost2, (int)ptestRWcompare->resultColorPost2); countErrors++; } if (ptestRWcompare->resultNeedsUpdate != ptestRW->resultNeedsUpdate) { trace("DIFFERENCE-resultNeedsUpdate %d %d\n", ptestRW->resultNeedsUpdate, ptestRWcompare->resultNeedsUpdate); countErrors++; } if (ptestRW->resultNeedsUpdate) { if (ptestRWcompare->resultUpdateRect.left != ptestRW->resultUpdateRect.left) { trace("DIFFERENCE-resultUpdateRect.left %d %d\n", (int)ptestRW->resultUpdateRect.left, (int)ptestRWcompare->resultUpdateRect.left); countErrors++; } if (ptestRWcompare->resultUpdateRect.top != ptestRW->resultUpdateRect.top) { trace("DIFFERENCE-resultUpdateRect.top %d %d\n", (int)ptestRW->resultUpdateRect.top, (int)ptestRWcompare->resultUpdateRect.top); countErrors++; } if (ptestRWcompare->resultUpdateRect.right != ptestRW->resultUpdateRect.right) { trace("DIFFERENCE-resultUpdateRect.right %d %d\n", (int)ptestRW->resultUpdateRect.right, (int)ptestRWcompare->resultUpdateRect.right); countErrors++; } if (ptestRWcompare->resultUpdateRect.bottom != ptestRW->resultUpdateRect.bottom) { trace("DIFFERENCE-resultUpdateRect.bottom %d %d\n", (int)ptestRW->resultUpdateRect.bottom, (int)ptestRWcompare->resultUpdateRect.bottom); countErrors++; } } if (ptestRWcompare->resultWmEraseGnd != ptestRW->resultWmEraseGnd) { trace("DIFFERENCE-resultWmEraseGnd %d %d\n", ptestRW->resultWmEraseGnd, ptestRWcompare->resultWmEraseGnd); countErrors++; } if (ptestRWcompare->resultWmNcPaint != ptestRW->resultWmNcPaint) { trace("DIFFERENCE-resultWmNcPaint %d %d\n", ptestRW->resultWmNcPaint, ptestRWcompare->resultWmNcPaint); countErrors++; } if (ptestRWcompare->resultPaintIndex != ptestRW->resultPaintIndex) { trace("DIFFERENCE-resultPaintIndex %d %d\n", ptestRW->resultPaintIndex, ptestRWcompare->resultPaintIndex); countErrors++; } } if (countErrors > 0) { trace("COUNT OF DIFFERENCES - %d\n", countErrors); }
return countErrors;}
void FlagsRedrawWindowTest(void){ STRUCT_TestRedrawWindow testRW; STRUCT_TestRedrawWindowCompare testRWcompare;
testRW.testPixelPre1x = 50; testRW.testPixelPre1y = 50; testRW.testPixelPre2x = 50; testRW.testPixelPre2y = 400; testRW.testPixelPost1x = 50; testRW.testPixelPost1y = 50; testRW.testPixelPost2x = 50; testRW.testPixelPost2y = 400; trace("Screen Width/Height (%dx%d)\n", GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); // RDW_ERASE tests testRW.testName = L"Test1"; testRW.flags = 0; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 0, 200, 200); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test1 fail\n");
testRW.testName = L"Test2"; testRW.flags = RDW_ERASE; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 0, 200, 200); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test2 fail\n");
testRW.testName = L"Test3"; testRW.flags = RDW_INVALIDATE; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test3 fail\n");
testRW.testName = L"Test4"; testRW.flags = RDW_INVALIDATE | RDW_ERASE; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = TRUE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test4 fail\n");
// RDW_FRAME tests testRW.testName = L"Test5"; testRW.flags = RDW_FRAME; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test5 fail\n");
testRW.testName = L"Test6"; testRW.flags = RDW_INVALIDATE | RDW_FRAME; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = TRUE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test6 fail\n");
// RDW_INTERNALPAINT tests testRW.testName = L"Test7"; testRW.flags = RDW_INTERNALPAINT; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test7 fail\n");
testRW.testName = L"Test8"; testRW.flags = RDW_INVALIDATE | RDW_INTERNALPAINT; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test8 fail\n");
// RDW_NOERASE tests testRW.testName = L"Test9"; testRW.flags = RDW_NOERASE; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test9 fail\n");
testRW.testName = L"Test10"; testRW.flags = RDW_INVALIDATE | RDW_NOERASE; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test10 fail\n");
testRW.testName = L"Test11"; testRW.flags = RDW_NOERASE | RDW_ERASE; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test11 fail\n");
testRW.testName = L"Test12"; testRW.flags = RDW_INVALIDATE | RDW_NOERASE | RDW_ERASE; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = TRUE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test12 fail\n");
// RDW_NOFRAME tests testRW.testName = L"Test13"; testRW.flags = RDW_NOFRAME; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test13 fail\n");
testRW.testName = L"Test14"; testRW.flags = RDW_INVALIDATE | RDW_NOFRAME; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test14 fail\n");
testRW.testName = L"Test15"; testRW.flags = RDW_INVALIDATE | RDW_VALIDATE | RDW_NOFRAME; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test15 fail\n");
testRW.testName = L"Test16"; testRW.flags = RDW_VALIDATE | RDW_NOFRAME; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test16 fail\n");
// RDW_NOINTERNALPAINT tests testRW.testName = L"Test17"; testRW.flags = RDW_NOINTERNALPAINT; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test17 fail\n");
testRW.testName = L"Test18"; testRW.flags = RDW_INVALIDATE | RDW_NOINTERNALPAINT; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test18 fail\n");
testRW.testName = L"Test19"; testRW.flags = RDW_VALIDATE | RDW_NOINTERNALPAINT; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test19 fail\n");
// RDW_ERASENOW tests testRW.testName = L"Test20"; testRW.flags = RDW_ERASENOW; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test20 fail\n");
testRW.testName = L"Test21"; testRW.flags = RDW_INVALIDATE | RDW_ERASENOW; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test21 fail\n");
testRW.testName = L"Test22"; testRW.flags = RDW_VALIDATE | RDW_ERASENOW; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test22 fail\n");
// RDW_UPDATENOW tests testRW.testName = L"Test23"; testRW.flags = RDW_UPDATENOW; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test23 fail\n");
testRW.testName = L"Test24"; testRW.flags = RDW_INVALIDATE | RDW_UPDATENOW; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test24 fail\n");
testRW.testName = L"Test25"; testRW.flags = RDW_VALIDATE | RDW_UPDATENOW; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test25 fail\n");
// RDW_ALLCHILDREN/RDW_NOCHILDREN tests testRW.testName = L"Test26"; testRW.flags = RDW_NOCHILDREN; testRW.useRegion = FALSE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPost1 = 0x00FF0000; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test26 fail\n");
testRW.testName = L"Test27"; testRW.flags = RDW_INVALIDATE | RDW_NOCHILDREN; testRW.useRegion = FALSE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x0000FF00; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPost1 = 0x0000FF00; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test27 fail\n");
testRW.testName = L"Test28"; testRW.flags = RDW_VALIDATE | RDW_NOCHILDREN; testRW.useRegion = FALSE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPost1 = 0x00FF0000; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test28 fail\n");
testRW.testName = L"Test29"; testRW.flags = RDW_ALLCHILDREN; testRW.useRegion = FALSE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPost1 = 0x00FF0000; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test29 fail\n");
testRW.testName = L"Test30"; testRW.flags = RDW_INVALIDATE | RDW_ALLCHILDREN; testRW.useRegion = FALSE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test30 fail\n");
testRW.testName = L"Test31"; testRW.flags = RDW_VALIDATE | RDW_ALLCHILDREN; testRW.useRegion = FALSE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPost1 = 0x00FF0000; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test31 fail\n");
testRW.testName = L"Test32"; testRW.flags = RDW_NOCHILDREN; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPost1 = 0x00FF0000; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test32 fail\n");
testRW.testName = L"Test33"; testRW.flags = RDW_INVALIDATE | RDW_NOCHILDREN; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test33 fail\n");
testRW.testName = L"Test34"; testRW.flags = RDW_VALIDATE | RDW_NOCHILDREN; testRW.useRegion = TRUE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = FALSE; SetRect(&testRW.rectRect, 0, 0, 200, 200); testRW.forcePaint = TRUE; testRW.testChild = TRUE;
testRWcompare.resultColorPre1 = 0x00FF0000; testRWcompare.resultColorPre2 = 0x0000FF00; testRWcompare.resultColorPost1 = 0x00FF0000; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test34 fail\n");
// rect defined area tests testRW.testName = L"Test35"; testRW.flags = 0; testRW.useRegion = FALSE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = TRUE; SetRect(&testRW.rectRect, 0, 300, 700, 500); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x000000FF; SetRect(&testRWcompare.resultUpdateRect, 0, 0, 200, 200); testRWcompare.resultNeedsUpdate = FALSE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 1; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test35 fail\n");
testRW.testName = L"Test36"; testRW.flags = RDW_INVALIDATE | RDW_ERASENOW; testRW.useRegion = FALSE; SetRect(&testRW.regRect, 0, 300, 700, 500); testRW.useRect = TRUE; SetRect(&testRW.rectRect, 0, 300, 700, 500); testRW.forcePaint = TRUE; testRW.testChild = FALSE;
testRWcompare.resultColorPre1 = 0x000000FF; testRWcompare.resultColorPre2 = 0x000000FF; testRWcompare.resultColorPost1 = 0x000000FF; testRWcompare.resultColorPost2 = 0x0000FF00; SetRect(&testRWcompare.resultUpdateRect, 0, 300, 700, 500); testRWcompare.resultNeedsUpdate = TRUE; testRWcompare.resultWmEraseGnd = FALSE; testRWcompare.resultWmNcPaint = FALSE; testRWcompare.resultPaintIndex = 2; ok(0 == TestRedrawWindow2(&testRW, &testRWcompare),"Test36 fail\n");}
START_TEST(RedrawWindow){ FlagsRedrawWindowTest(); GetMessageRedrawWindowTest();}