From 4d7892f8863e2550dea86f66bf3b68eae2dc1f23 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Mon, 30 Aug 2004 18:36:55 +0000 Subject: [PATCH] TB_MARKITEM should redraw button. --- dlls/comctl32/toolbar.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 92dd25bfaed..04e1e5a3c35 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -3986,6 +3986,8 @@ TOOLBAR_MarkButton (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); INT nIndex; + DWORD oldState; + TBUTTON_INFO *btnPtr; TRACE("hwnd = %p, wParam = %d, lParam = 0x%08lx\n", hwnd, wParam, lParam); @@ -3993,10 +3995,16 @@ TOOLBAR_MarkButton (HWND hwnd, WPARAM wParam, LPARAM lParam) if (nIndex == -1) return FALSE; + btnPtr = &infoPtr->buttons[nIndex]; + oldState = btnPtr->fsState; + if (LOWORD(lParam)) - infoPtr->buttons[nIndex].fsState |= TBSTATE_MARKED; + btnPtr->fsState |= TBSTATE_MARKED; else - infoPtr->buttons[nIndex].fsState &= ~TBSTATE_MARKED; + btnPtr->fsState &= ~TBSTATE_MARKED; + + if(oldState != btnPtr->fsState) + InvalidateRect(hwnd, &btnPtr->rect, TRUE); return TRUE; }