Setting the HotItem to -1 can be disastrous at times if it equals

oldhit.
This commit is contained in:
Aric Stewart 2001-02-16 19:06:34 +00:00 committed by Alexandre Julliard
parent dd2247817e
commit 826465dc22

View File

@ -3369,6 +3369,9 @@ TOOLBAR_SetHotItem (HWND hwnd, WPARAM wParam)
INT nOldHotItem = infoPtr->nHotItem; INT nOldHotItem = infoPtr->nHotItem;
TBUTTON_INFO *btnPtr; TBUTTON_INFO *btnPtr;
if ((INT) wParam < 0 || (INT)wParam > infoPtr->nNumButtons)
wParam = -2;
if (GetWindowLongA (hwnd, GWL_STYLE) & TBSTYLE_FLAT) if (GetWindowLongA (hwnd, GWL_STYLE) & TBSTYLE_FLAT)
{ {