主题:关于字体输出问题
long WINAPI WndProc(HWND hWnd, UINT iMessage, UINT wParam, LONG lParam)
{
static long X=0, Y=0;
int i;
HDC hDC;
static char a[2];
TEXTMETRIC tm;
PAINTSTRUCT PtStr;
static char textbuf[] ="福如东海寿比南山";
switch (iMessage)
{
case WM_CREATE:
hDC = GetDC(hWnd) ;
ReleaseDC(hWnd, hDC);
break;
case WM_PAINT:
hDC = BeginPaint(hWnd, &PtStr);
for(i=0;i<21;i++)
{
X=200*sin(2*3.14*i/20)+430;
Y=200*cos(2*3.14*i/20)+230;
a=textbuf[i];
TextOut(hDC, X, Y, a,strlen(a));
}
EndPaint(hWnd, &PtStr);
我的这个程序怎么不能输出汉字啊!高手们帮帮忙啊!
{
static long X=0, Y=0;
int i;
HDC hDC;
static char a[2];
TEXTMETRIC tm;
PAINTSTRUCT PtStr;
static char textbuf[] ="福如东海寿比南山";
switch (iMessage)
{
case WM_CREATE:
hDC = GetDC(hWnd) ;
ReleaseDC(hWnd, hDC);
break;
case WM_PAINT:
hDC = BeginPaint(hWnd, &PtStr);
for(i=0;i<21;i++)
{
X=200*sin(2*3.14*i/20)+430;
Y=200*cos(2*3.14*i/20)+230;
a=textbuf[i];
TextOut(hDC, X, Y, a,strlen(a));
}
EndPaint(hWnd, &PtStr);
我的这个程序怎么不能输出汉字啊!高手们帮帮忙啊!