Font von CListCtrl
-
ich möchte in einem CListCtrl die Schrift ändern.
dazu mache ich momentan folgendes:CFont font; VERIFY(font.CreateFont( 12, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_NORMAL, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily _T("Courier")) ); GetDlgItem(IDC_LIST)->SetFont(&font);
jedoch hat nur der nHeight-Wert einfluss auf die Schrift.
Alles andere hat keinen Einfluss, die Schrift wird immer Fett
und in MS Sans Serif dargestellt.muss ich das irgendwie anders machen?
-
hab wohl den standard-fehler gemacht.
lokales CFont in der OnInitDialog() methode.
mit einem globalen CFont funktioniert es auch.