From 5768aac7e7fe6f583b3829ae120ef1c190172d30 Mon Sep 17 00:00:00 2001 From: Alexey Slepov Date: Sat, 2 Jun 2012 20:52:16 +0400 Subject: [4/4] user32/tests: WM_ERASEBKGND message should not be sent inside of BeginPaint function (new) --- dlls/user32/tests/dialog.c | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index 6c969ab..d4ea490 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -1428,9 +1428,35 @@ static INT_PTR CALLBACK client_dc_DlgWinProc (HWND hDlg, UINT uiMsg, WPARAM wPar return FALSE; } +static INT_PTR CALLBACK paint_dc_DlgWinProc (HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) +{ + static int erasecnt = 0; + + switch (uiMsg) { + case WM_PAINT: + { + PAINTSTRUCT ps; + erasecnt = 0; + BeginPaint(hDlg, &ps); + todo_wine { + ok(erasecnt == 0, + "WM_ERASEBKGND message should not be sent inside of BeginPaint function.\n"); + } + EndPaint(hDlg, &ps); + EndDialog(hDlg, 0); + return 0; + } + case WM_ERASEBKGND: + erasecnt++; + break; + } + return FALSE; +} + static void test_WM_PAINT(void) { DialogBox(0, "TEST_DIALOG", 0, client_dc_DlgWinProc); + DialogBox(0, "TEST_DIALOG", 0, paint_dc_DlgWinProc); } START_TEST(dialog) -- 1.7.2.5