TB_MARKITEM should redraw button.

This commit is contained in:
Robert Shearman 2004-08-30 18:36:55 +00:00 committed by Alexandre Julliard
parent a8509028c1
commit 4d7892f886
1 changed files with 10 additions and 2 deletions

View File

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