Continued the implementation of Set Hot Item.

This commit is contained in:
Aric Stewart 2001-02-15 21:25:03 +00:00 committed by Alexandre Julliard
parent a2c2a83f8e
commit 40a38f7f9a

View File

@ -3367,13 +3367,26 @@ TOOLBAR_SetHotItem (HWND hwnd, WPARAM wParam)
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
INT nOldHotItem = infoPtr->nHotItem;
TBUTTON_INFO *btnPtr;
if (GetWindowLongA (hwnd, GWL_STYLE) & TBSTYLE_FLAT)
{
infoPtr->nHotItem = (INT)wParam;
/* FIXME: What else must be done ??? */
infoPtr->nHotItem = (INT)wParam;
if (wParam >=0)
{
btnPtr = &infoPtr->buttons[(INT)wParam];
btnPtr->bHot = TRUE;
InvalidateRect (hwnd, &btnPtr->rect,
TOOLBAR_HasText(infoPtr, btnPtr));
}
if (nOldHotItem>=0)
{
btnPtr = &infoPtr->buttons[nOldHotItem];
btnPtr->bHot = FALSE;
InvalidateRect (hwnd, &btnPtr->rect,
TOOLBAR_HasText(infoPtr, btnPtr));
}
}
if (nOldHotItem < 0)