[2/2] comctl32/tests: A basic test for ListView WM_SETREDRAW
Nikolay Sivov
bunglehead at gmail.com
Wed May 20 14:12:43 CDT 2009
Changelog:
- A basic test for ListView WM_SETREDRAW
>From 814102a64d82236ff403ddc0ec75828ad5d7b8bd Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Wed, 20 May 2009 22:34:48 +0400
Subject: A basic test for ListView WM_SETREDRAW
---
dlls/comctl32/tests/listview.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 0c6b139..1c002d9 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -2215,6 +2215,32 @@ static void test_nosortheader(void)
DestroyWindow(hwnd);
}
+static void test_setredraw(void)
+{
+ HWND hwnd;
+ DWORD_PTR style;
+ DWORD ret;
+
+ hwnd = create_listview_control(0);
+ ok(hwnd != NULL, "failed to create a listview window\n");
+
+ /* Passing WM_SETREDRAW to DefWinProc removes WS_VISIBLE.
+ ListView seems to handle it internally without DefWinProc */
+
+ /* default value first */
+ ret = SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
+ expect(0, ret);
+ /* disable */
+ style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ ok(style & WS_VISIBLE, "Expected WS_VISIBLE to be set\n");
+ ret = SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
+ expect(0, ret);
+ style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ ok(style & WS_VISIBLE, "Expected WS_VISIBLE to be set\n");
+
+ DestroyWindow(hwnd);
+}
+
START_TEST(listview)
{
HMODULE hComctl32;
@@ -2257,4 +2283,7 @@ START_TEST(listview)
test_ownerdata();
test_norecompute();
test_nosortheader();
+ test_setredraw();
+
+ DestroyWindow(hwndparent);
}
--
1.5.6.5
More information about the wine-patches
mailing list