Refresh bitmap count to take in account imagelist changes after
TB_SETIMAGELIST.
This commit is contained in:
parent
2d82be84a5
commit
5aa9754c6a
|
@ -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++)
|
||||
|
|
Loading…
Reference in New Issue