case WM_CREATE:
。。。
int fontangle;
//int fontw,fonth;
for(fontangle=0,select=0;fontangle<3600;fontangle=fontangle+300,select++)
hfont[fontangle/300]=CreateFont(
100, //int nHeight logical height of font
60, //int nWidth logical average character width
fontangle, //int nEscapement angle of escapement
0, //int nOrientation base-line orientation angle
FW_HEAVY, //int fnWeight font weight
false , //DWORD fdwItalic italic attribute flag
false, //DWORD fdwUnderline underline attribute flag
false, //DWORD fdwStrikeOut strikeout attribute flag
GB2312_CHARSET, //DWORD fdwCharSet character set identifier
OUT_DEVICE_PRECIS, //DWORD fdwOutputPrecision output precision
CLIP_DEFAULT_PRECIS, //DWORD fdwClipPrecision clipping precision
DEFAULT_QUALITY, //DWORD fdwQuality output quality
DEFAULT_PITCH, // DWORD fdwPitchAndFamilypitch and family
NULL //LPCTSTR lpszFace pointer to typeface name string
);
SelectObject(BackgrdDCNEW, hfont[select]);
倾斜字体
case WM_PAINT:
.。。。
DrawText(BackgrdDCNEW,"hello!",6,&rect,DT_CENTER);
//BackgrdDCNEW是一个兼容DC
定制N种字体样式,做成数组,便于SelectObject选取。