LOGFONT logFont;
logFont.lfHeight=10;
logFont.lfWeight=FW_BOLD;
logFont.lfOrientation=0;
logFont.lfEscapement=0;
logFont.lfStrikeOut=1;
logFont.lfUnderline=0;
logFont.lfItalic=0;
logFont.lfCharSet=GB2312_CHARSET;
logFont.lfOutPrecision=OUT_DEFAULT_PRECIS;
logFont.lfClipPrecision=CLIP_DEFAULT_PRECIS;
logFont.lfQuality=DEFAULT_QUALITY;
logFont.lfPitchAndFamily=DEFAULT_PITCH|FF_ROMAN;
strcpy(logFont.lfFaceName,"The Times Roman");
CFont font;
font.CreateFontIndirect(&logFont);
m_WW.SetFont(&font, TRUE);
--------------------------------
win32 环境 则:
hdc = GetDC (hwnd) ;
hFont = CreateFont(12,0,0,0,FW_NORMAL,
FALSE,FALSE,FALSE,DEFAULT_CHARSET,
OUT_RASTER_PRECIS,CLIP_DEFAULT_PRECIS,
VARIABLE_PITCH|PROOF_QUALITY,FF_DONTCARE,_T("隶书"));
SelectObject(hdc,hFont);
ReleaseDC (hwnd, hdc) ;