comctl32: Forward WM_MEASUREITEM to Rebar notification window.

This commit is contained in:
Nikolay Sivov 2013-05-19 23:51:33 +04:00 committed by Alexandre Julliard
parent 4f99560ef0
commit 2d5abbd1d7
2 changed files with 23 additions and 5 deletions

View File

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

View File

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