Guy Albertelli : listview: Return correct value from WM_NOTIFYFORMAT with test.
Alexandre Julliard
julliard at winehq.org
Thu May 8 04:50:54 CDT 2008
Module: wine
Branch: master
Commit: 09cb415109447c4be086f1c756f8a168628457f7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=09cb415109447c4be086f1c756f8a168628457f7
Author: Guy Albertelli <galberte at neo.rr.com>
Date: Thu May 8 00:46:38 2008 -0400
listview: Return correct value from WM_NOTIFYFORMAT with test.
---
dlls/comctl32/listview.c | 9 ++++-----
dlls/comctl32/tests/listview.c | 3 +++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index e743531..26a9eb2 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -8972,11 +8972,10 @@ static LRESULT LISTVIEW_NotifyFormat(LISTVIEW_INFO *infoPtr, HWND hwndFrom, INT
{
TRACE("(hwndFrom=%p, nCommand=%d)\n", hwndFrom, nCommand);
- if (nCommand != NF_REQUERY) return 0;
-
- infoPtr->notifyFormat = SendMessageW(hwndFrom, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
-
- return 0;
+ if (nCommand == NF_REQUERY)
+ infoPtr->notifyFormat = SendMessageW(hwndFrom, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
+
+ return infoPtr->notifyFormat;
}
/***
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 838691c..91f9d00 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -856,6 +856,9 @@ static void test_icon_spacing(void)
hwnd = create_custom_listview_control(LVS_ICON);
ok(hwnd != NULL, "failed to create a listview window\n");
+ r = SendMessage(hwnd, WM_NOTIFYFORMAT, (WPARAM)hwndparent, (LPARAM)NF_REQUERY);
+ expect(NFR_ANSI, r);
+
flush_sequences(sequences, NUM_MSG_SEQUENCES);
trace("test icon spacing\n");
More information about the wine-cvs
mailing list