Nikolay Sivov : comctl32/listview: Additional test for LVS_EX_HEADERDRAGDROP.

Alexandre Julliard julliard at winehq.org
Mon May 4 09:06:40 CDT 2009


Module: wine
Branch: master
Commit: 59b08cc1e3e0d6d3810a50e9cfb5cb1f44bb4e3f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=59b08cc1e3e0d6d3810a50e9cfb5cb1f44bb4e3f

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Sun May  3 03:12:12 2009 +0400

comctl32/listview: Additional test for LVS_EX_HEADERDRAGDROP.

---

 dlls/comctl32/tests/listview.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index ee5eb7f..6b575dc 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -1020,6 +1020,7 @@ static void test_create(void)
     /* setting LVS_EX_HEADERDRAGDROP creates header */
     hList = CreateWindow("SysListView32", "Test", LVS_REPORT, 0, 0, 100, 100, NULL, NULL,
                           GetModuleHandle(NULL), 0);
+    hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0);
     ok(!IsWindow(hHeader), "Header shouldn't be created\n");
     ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n");
     SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_HEADERDRAGDROP);
@@ -1028,6 +1029,13 @@ static void test_create(void)
     ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n");
     DestroyWindow(hList);
 
+    /* not report style accepts LVS_EX_HEADERDRAGDROP too */
+    hList = create_custom_listview_control(0);
+    SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_HEADERDRAGDROP);
+    r = SendMessage(hList, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
+    ok(r & LVS_EX_HEADERDRAGDROP, "Expected LVS_EX_HEADERDRAGDROP to be set\n");
+    DestroyWindow(hList);
+
     /* requesting header info with LVM_GETSUBITEMRECT doesn't create it */
     hList = CreateWindow("SysListView32", "Test", LVS_REPORT, 0, 0, 100, 100, NULL, NULL,
                           GetModuleHandle(NULL), 0);




More information about the wine-cvs mailing list