listview: Return correct value from WM_NOTIFYFORMAT with test.

This commit is contained in:
Guy Albertelli 2008-05-08 00:46:38 -04:00 committed by Alexandre Julliard
parent 2b52dd8450
commit 09cb415109
2 changed files with 7 additions and 5 deletions

View File

@ -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;
if (nCommand == NF_REQUERY)
infoPtr->notifyFormat = SendMessageW(hwndFrom, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
infoPtr->notifyFormat = SendMessageW(hwndFrom, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
return 0;
return infoPtr->notifyFormat;
}
/***

View File

@ -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");