Refresh bitmap count to take in account imagelist changes after

TB_SETIMAGELIST.
This commit is contained in:
Gerard Patel 2001-07-17 00:39:15 +00:00 committed by Alexandre Julliard
parent 2d82be84a5
commit 5aa9754c6a
1 changed files with 4 additions and 3 deletions

View File

@ -226,9 +226,6 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
rcText.top += infoPtr->nBitmapHeight;
}
}
else {
rcText.top += infoPtr->nBitmapHeight;
}
if (nState & (TBSTATE_PRESSED | TBSTATE_CHECKED))
OffsetRect (&rcText, 1, 1);
@ -505,6 +502,10 @@ TOOLBAR_Refresh (HWND hwnd, HDC hdc, PAINTSTRUCT* ps)
INT i;
RECT rcTemp;
/* if imagelist belongs to the app, it can be changed
by the app after setting it */
if (infoPtr->himlDef != infoPtr->himlInt)
infoPtr->nNumBitmaps = ImageList_GetImageCount(infoPtr->himlDef);
/* redraw necessary buttons */
btnPtr = infoPtr->buttons;
for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++)