先根据圆的半径,字符串长度算出每个字符的位置,该字符的偏转角度。
对于字符的位置使用TextOut指定x,y。其函数原型如下:
BOOL TextOut(
HDC hdc, // handle to DC
int nXStart, // x-coordinate of starting position
int nYStart, // y-coordinate of starting position
LPCTSTR lpString, // character string
int cbString // number of characters
);
对于字符的偏转角度,使用CreateFont,其函数原型如下:
HFONT CreateFont(
int nHeight, // height of font
int nWidth, // average character width
int nEscapement, // angle of escapement
int nOrientation, // base-line orientation angle
int fnWeight, // font weight
DWORD fdwItalic, // italic attribute option
DWORD fdwUnderline, // underline attribute option
DWORD fdwStrikeOut, // strikeout attribute option
DWORD fdwCharSet, // character set identifier
DWORD fdwOutputPrecision, // output precision
DWORD fdwClipPrecision, // clipping precision
DWORD fdwQuality, // output quality
DWORD fdwPitchAndFamily, // pitch and family
LPCTSTR lpszFace // typeface name
);
可以参考http://www.99inf.net/SoftwareDev/VC/37782.htm
----------------
MoreWindows
微软最有价值专家,CSDN博客专家,迅雷/微软实习生,迅雷大全核心研发人员,百度校招第二名。
个人博客:http://blog.csdn.net/MoreWindows