The calculated button height should include the text height when no

buttons are present.
This commit is contained in:
Robert Shearman 2005-07-22 18:28:46 +00:00 committed by Alexandre Julliard
parent 3b77de9cac
commit 2e0a42ec2c
1 changed files with 9 additions and 1 deletions

View File

@ -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))