Huw Davies : comctl32/tests: Use more than one item for the custom draw tests.
Alexandre Julliard
julliard at winehq.org
Tue Dec 6 16:27:45 CST 2016
Module: wine
Branch: master
Commit: 3f0002020ae401d3ee740443257b512061d4d9b8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f0002020ae401d3ee740443257b512061d4d9b8
Author: Huw Davies <huw at codeweavers.com>
Date: Tue Dec 6 10:25:25 2016 +0000
comctl32/tests: Use more than one item for the custom draw tests.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tests/treeview.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index e2fb443..388124a 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -328,6 +328,8 @@ static const struct message parent_cd_seq[] = {
{ WM_NOTIFY, sent|id|custdraw, 0, 0, NM_CUSTOMDRAW, CDDS_PREPAINT },
{ WM_NOTIFY, sent|id|custdraw, 0, 0, NM_CUSTOMDRAW, CDDS_ITEMPREPAINT },
{ WM_NOTIFY, sent|id|custdraw, 0, 0, NM_CUSTOMDRAW, CDDS_ITEMPOSTPAINT },
+ { WM_NOTIFY, sent|id|custdraw, 0, 0, NM_CUSTOMDRAW, CDDS_ITEMPREPAINT },
+ { WM_NOTIFY, sent|id|custdraw, 0, 0, NM_CUSTOMDRAW, CDDS_ITEMPOSTPAINT },
{ WM_NOTIFY, sent|id|custdraw, 0, 0, NM_CUSTOMDRAW, CDDS_POSTPAINT },
{ 0 }
};
@@ -2317,20 +2319,12 @@ static void test_WM_GETDLGCODE(void)
static void test_customdraw(void)
{
- static const char *rootA = "root";
- TVINSERTSTRUCTA ins;
- HTREEITEM hRoot;
LOGFONTA lf;
HWND hwnd;
hwnd = create_treeview_control(0);
-
- ins.hParent = TVI_ROOT;
- ins.hInsertAfter = TVI_ROOT;
- U(ins).item.mask = TVIF_TEXT;
- U(ins).item.pszText = (char*)rootA;
- hRoot = TreeView_InsertItemA(hwnd, &ins);
- ok(hRoot != NULL, "got %p\n", hRoot);
+ fill_tree(hwnd);
+ SendMessageA(hwnd, TVM_EXPAND, TVE_EXPAND, (WPARAM)hRoot);
/* create additional font, custom draw handler will select it */
SystemParametersInfoA(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0);
More information about the wine-cvs
mailing list