mirror of
https://github.com/reactos/reactos.git
synced 2024-07-07 05:05:09 +00:00
- Better handling of error cases when no fonts are present in the system.
svn path=/trunk/; revision=9904
This commit is contained in:
parent
13d400fbd2
commit
3bd4ef3363
|
@ -2024,7 +2024,8 @@ calc_label:
|
|||
infoPtr->iconSize.cy + ICON_BOTTOM_PADDING;
|
||||
Label.right = Label.left + labelSize.cx;
|
||||
Label.bottom = Label.top + infoPtr->nItemHeight;
|
||||
if (!oversizedBox && labelSize.cy > infoPtr->ntmHeight)
|
||||
if (!oversizedBox && labelSize.cy > infoPtr->ntmHeight &&
|
||||
infoPtr->ntmHeight)
|
||||
{
|
||||
labelSize.cy = min(Box.bottom - Label.top, labelSize.cy);
|
||||
labelSize.cy /= infoPtr->ntmHeight;
|
||||
|
@ -9516,7 +9517,8 @@ static HWND CreateEditLabelT(LISTVIEW_INFO *infoPtr, LPCWSTR text, DWORD style,
|
|||
hOldFont = SelectObject(hdc, infoPtr->hFont);
|
||||
|
||||
/*Get String Length in pixels */
|
||||
GetTextExtentPoint32W(hdc, text, lstrlenW(text), &sz);
|
||||
if(!GetTextExtentPoint32W(hdc, text, lstrlenW(text), &sz))
|
||||
sz.cx = 0;
|
||||
|
||||
/*Add Extra spacing for the next character */
|
||||
GetTextMetricsW(hdc, &textMetric);
|
||||
|
|
Loading…
Reference in a new issue