1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

comdlg32: Show better font style information in fontdlg.

This commit is contained in:
Byeong-Sik Jeon 2006-09-14 21:10:19 +09:00 committed by Alexandre Julliard
parent 15b7934f3d
commit e1c630847c

View File

@ -386,13 +386,14 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
hf=SelectObject(hdc,hf);
DeleteObject(hf);
/* font successful created ? */
if (tm.tmWeight==fontstyles[i].weight &&
if (((fontstyles[i].weight == FW_NORMAL && tm.tmWeight <= FW_MEDIUM) ||
(fontstyles[i].weight == FW_BOLD && tm.tmWeight > FW_MEDIUM)) &&
((tm.tmItalic != 0)==fontstyles[i].italic))
{
j=SendMessageW(hwnd,CB_ADDSTRING,0,(LPARAM)fontstyles[i].stname );
if (j==CB_ERR) return 1;
j=SendMessageW(hwnd, CB_SETITEMDATA, j,
MAKELONG(fontstyles[i].weight,fontstyles[i].italic));
MAKELONG(tm.tmWeight,fontstyles[i].italic));
if (j==CB_ERR) return 1;
}
}