diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index c1ba3c0ab22..1f61ab5b1e2 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -1175,12 +1175,20 @@ TOOLBAR_CalcStrings (HWND hwnd, LPSIZE lpSize) lpSize->cx = 0; lpSize->cy = 0; - if(infoPtr->nMaxTextRows == 0) + if (infoPtr->nMaxTextRows == 0) return; 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))