PDA

Click to See Complete Forum and Search --> : Static Control in VC++6


ND4SPD
Dec 27th, 2000, 06:49 PM
How do i make the font bold or change the font type
in a static control?

Vlatko
Dec 28th, 2000, 05:00 AM
Try this:

HFONT f = CreateFont(13,0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,OUT_CHARACTER_PRECIS,CLIP_CHARACTER_PRECIS,DEFAU LT_QUALITY,DEFAULT_PITCH | FF_DONTCARE,"Arial or another fontname");
SendMessage(GetDlgItem(hDlg,IDC_STATIC1),WM_SETFONT,(WPARAM)f,MAKELPARAM(TRUE, 0));