Nikolay Sivov : comctl32/tests: Basic test for TVS_FULLROWSELECT style bit.
Alexandre Julliard
julliard at winehq.org
Mon Aug 8 11:09:29 CDT 2016
Module: wine
Branch: master
Commit: 2728909e6ce18e7a149a2dda8c0a787ca13ac06c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2728909e6ce18e7a149a2dda8c0a787ca13ac06c
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Aug 8 10:57:15 2016 +0300
comctl32/tests: Basic test for TVS_FULLROWSELECT style bit.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tests/treeview.c | 25 +++++++++++++++++++++++++
include/commctrl.h | 2 +-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index 7e6c731..e2fb443 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -2369,6 +2369,30 @@ static void test_WM_KEYDOWN(void)
DestroyWindow(hwnd);
}
+static void test_TVS_FULLROWSELECT(void)
+{
+ DWORD style;
+ HWND hwnd;
+
+ /* try to create both with TVS_HASLINES and TVS_FULLROWSELECT */
+ hwnd = create_treeview_control(TVS_FULLROWSELECT);
+
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ ok((style & (TVS_FULLROWSELECT | TVS_HASLINES)) == (TVS_FULLROWSELECT | TVS_HASLINES), "got style 0x%08x\n", style);
+
+ DestroyWindow(hwnd);
+
+ /* create just with TVS_HASLINES, try to enable TVS_FULLROWSELECT later */
+ hwnd = create_treeview_control(0);
+
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ SetWindowLongA(hwnd, GWL_STYLE, style | TVS_FULLROWSELECT);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ ok(style & TVS_FULLROWSELECT, "got style 0x%08x\n", style);
+
+ DestroyWindow(hwnd);
+}
+
START_TEST(treeview)
{
HMODULE hComctl32;
@@ -2444,6 +2468,7 @@ START_TEST(treeview)
test_WM_GETDLGCODE();
test_customdraw();
test_WM_KEYDOWN();
+ test_TVS_FULLROWSELECT();
if (!load_v6_module(&ctx_cookie, &hCtx))
{
diff --git a/include/commctrl.h b/include/commctrl.h
index 7d6f5c5..dde038b 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -2400,7 +2400,7 @@ static const WCHAR WC_TREEVIEWW[] = { 'S','y','s',
#define TVHT_ONITEMBUTTON 0x0010
#define TVHT_ONITEMRIGHT 0x0020
#define TVHT_ONITEMSTATEICON 0x0040
-#define TVHT_ONITEM 0x0046
+#define TVHT_ONITEM (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON)
#define TVHT_ABOVE 0x0100
#define TVHT_BELOW 0x0200
#define TVHT_TORIGHT 0x0400
More information about the wine-cvs
mailing list