The calculated button height should include the text height when no
buttons are present.
This commit is contained in:
parent
3b77de9cac
commit
2e0a42ec2c
|
@ -1181,6 +1181,14 @@ TOOLBAR_CalcStrings (HWND hwnd, LPSIZE lpSize)
|
|||
hdc = GetDC (hwnd);
|
||||
hOldFont = SelectObject (hdc, infoPtr->hFont);
|
||||
|
||||
if (infoPtr->nNumButtons == 0)
|
||||
{
|
||||
TEXTMETRICW tm;
|
||||
|
||||
GetTextMetricsW(hdc, &tm);
|
||||
lpSize->cy = tm.tmHeight;
|
||||
}
|
||||
|
||||
btnPtr = infoPtr->buttons;
|
||||
for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++) {
|
||||
if(TOOLBAR_HasText(infoPtr, btnPtr))
|
||||
|
|
Loading…
Reference in New Issue