Nikolay Sivov : comctl32: Forward WM_MEASUREITEM to Rebar notification window.
Module: wine Branch: master Commit: 2d5abbd1d732b60a6bb9771f358f126b9db8ccb8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2d5abbd1d732b60a6bb9771f35... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 19 23:51:33 2013 +0400 comctl32: Forward WM_MEASUREITEM to Rebar notification window. --- dlls/comctl32/rebar.c | 4 +--- dlls/comctl32/tests/rebar.c | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index fa21baa..461dc34 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -46,7 +46,6 @@ * - RB_SETTOOLTIPS * - WM_CHARTOITEM * - WM_LBUTTONDBLCLK - * - WM_MEASUREITEM * - WM_PALETTECHANGED * - WM_QUERYNEWPALETTE * - WM_RBUTTONDOWN @@ -3723,6 +3722,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_COMMAND: case WM_DRAWITEM: case WM_NOTIFY: + case WM_MEASUREITEM: return SendMessageW(REBAR_GetNotifyParent (infoPtr), uMsg, wParam, lParam); @@ -3748,8 +3748,6 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_LBUTTONUP: return REBAR_LButtonUp (infoPtr); -/* case WM_MEASUREITEM: supported according to ControlSpy */ - case WM_MOUSEMOVE: return REBAR_MouseMove (infoPtr, lParam); diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c index 88c931c..331af28 100644 --- a/dlls/comctl32/tests/rebar.c +++ b/dlls/comctl32/tests/rebar.c @@ -124,7 +124,9 @@ static HWND build_toolbar(int nr, HWND hParent) return hToolbar; } -static LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +static int g_parent_measureitem; + +static LRESULT CALLBACK parent_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { @@ -135,6 +137,9 @@ static LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa GetClientRect(lpnm->hwndFrom, &height_change_notify_rect); } break; + case WM_MEASUREITEM: + g_parent_measureitem++; + break; } return DefWindowProcA(hWnd, msg, wParam, lParam); } @@ -1056,7 +1061,7 @@ static BOOL register_parent_wnd_class(void) wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); wc.lpszMenuName = NULL; wc.lpszClassName = "MyTestWnd"; - wc.lpfnWndProc = MyWndProc; + wc.lpfnWndProc = parent_wndproc; return RegisterClassA(&wc); } @@ -1106,6 +1111,20 @@ static void test_showband(void) DestroyWindow(hRebar); } +static void test_notification(void) +{ + MEASUREITEMSTRUCT mis; + HWND rebar; + + rebar = create_rebar_control(); + + g_parent_measureitem = 0; + SendMessageA(rebar, WM_MEASUREITEM, 0, (LPARAM)&mis); + ok(g_parent_measureitem == 1, "got %d\n", g_parent_measureitem); + + DestroyWindow(rebar); +} + START_TEST(rebar) { HMODULE hComctl32; @@ -1132,6 +1151,7 @@ START_TEST(rebar) test_bandinfo(); test_colors(); test_showband(); + test_notification(); if(!is_font_installed("System") || !is_font_installed("Tahoma")) {
participants (1)
-
Alexandre Julliard