From: Alanas alanas.00@mail.ru
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57178 --- dlls/comctl32/tests/toolbar.c | 4 ++-- dlls/comctl32/toolbar.c | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 67481628ef2..8d1a50ccabe 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -2867,8 +2867,8 @@ static void test_WM_NOTIFY(void) rebuild_toolbar(&toolbar); expecting_test_WM_NOTIFY = TRUE; ret = SendMessageA(toolbar, WM_NOTIFY, 0, (LPARAM)&test_WM_NOTIFY_nmhdr); - todo_wine ok(ret == TEST_WM_NOTIFY_RETURN, "SendMessageA returned 0x%Ix\n", ret); - todo_wine ok(!expecting_test_WM_NOTIFY, "toolbar didn't forward WM_NOTIFY to parent\n"); + ok(ret == TEST_WM_NOTIFY_RETURN, "SendMessageA returned 0x%Ix\n", ret); + ok(!expecting_test_WM_NOTIFY, "toolbar didn't forward WM_NOTIFY to parent\n"); expecting_test_WM_NOTIFY = FALSE; DestroyWindow(toolbar); } diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 690a02db6ee..c32abe915b1 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -172,6 +172,7 @@ typedef struct TBUTTON_INFO *buttons; /* pointer to button array */ LPWSTR *strings; /* pointer to string array */ TBITMAP_INFO *bitmaps; + COMCTL32_UnicodeBuffer unicodeBuffer;/* used in WN_NOTIFY forwarding if bUnicode */ } TOOLBAR_INFO, *PTOOLBAR_INFO;
@@ -5348,6 +5349,7 @@ TOOLBAR_Destroy (TOOLBAR_INFO *infoPtr) DeleteObject (infoPtr->hDefaultFont);
CloseThemeData (infoPtr->hTheme); + Free (infoPtr->unicodeBuffer.address);
/* free toolbar info data */ SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0); @@ -6357,11 +6359,12 @@ TOOLBAR_Notify (TOOLBAR_INFO *infoPtr, LPNMHDR lpnmh)
case TTN_GETDISPINFOA: FIXME("TTN_GETDISPINFOA - should not be received; please report\n"); - return 0; - - default: - return 0; + break; } + /* note: PGN_LAST < PGN_FIRST */ + if (lpnmh->code >= PGN_LAST && lpnmh->code <= PGN_FIRST) + return 0; + return infoPtr->bUnicode ? SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, lpnmh->idFrom, (LPARAM)lpnmh) : COMCTL32_ForwardNotifyToAnsiWindow(infoPtr->hwndNotify, lpnmh, &infoPtr->unicodeBuffer); }