From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/tests/toolbar.c | 4 ++++ dlls/comctl32/toolbar.c | 5 +++++ 2 files changed, 9 insertions(+)
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index ba2720ac0b4..1b95fdfe853 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -513,6 +513,7 @@ static void basic_test(void) TBBUTTON buttons[9]; HWND hToolbar; int i; + DWORD idx;
for (i=0; i<9; i++) MakeButton(buttons+i, 1000+i, TBSTYLE_CHECKGROUP, 0); @@ -529,6 +530,9 @@ static void basic_test(void) ok(hToolbar != NULL, "Toolbar creation\n"); SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)"test\000");
+ idx = SendMessageA(hToolbar, WM_GETOBJECT, 0, OBJID_QUERYCLASSNAMEIDX); + ok(idx == 0x1000c, "Got index 0x%08lx\n", idx); + /* test for exclusion working inside a separator-separated :-) group */ SendMessageA(hToolbar, TB_CHECKBUTTON, 1000, 1); /* press A1 */ ok(SendMessageA(hToolbar, TB_ISBUTTONCHECKED, 1000, 0), "A1 pressed\n"); diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 0b3730f4cba..da66d3972c3 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -6866,6 +6866,11 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_GETFONT: return TOOLBAR_GetFont (infoPtr);
+ case WM_GETOBJECT: + if ((LONG)lParam == OBJID_QUERYCLASSNAMEIDX) + return 0x1000c; + return DefWindowProcW (hwnd, uMsg, wParam, lParam); + case WM_KEYDOWN: return TOOLBAR_KeyDown (infoPtr, wParam, lParam);