WIN32API中,有什么办法输出一个字符?该如何处理
WIN32API中,有什么办法输出一个字符?
比如一个TCHAR类型的字符,有什么办法输出它? 就输出它一个,难道只有用wsprintf弄到一个字符缓冲区,然后再用textout或者drawtext来输出吗?
------解决方案--------------------
怎么不好好看看MSDN
lpString
[in] Pointer to the string to be drawn. The string does not need to be zero-terminated, since cbString specifies the length of the string.
TCHAR tch;
TextOut(hDC, x, y, &tch, 1);
DrawText(hDC, &tch, 1, rt, DT_CENTER);
比如一个TCHAR类型的字符,有什么办法输出它? 就输出它一个,难道只有用wsprintf弄到一个字符缓冲区,然后再用textout或者drawtext来输出吗?
------解决方案--------------------
怎么不好好看看MSDN
lpString
[in] Pointer to the string to be drawn. The string does not need to be zero-terminated, since cbString specifies the length of the string.
TCHAR tch;
TextOut(hDC, x, y, &tch, 1);
DrawText(hDC, &tch, 1, rt, DT_CENTER);