64,654
社区成员
发帖
与我相关
我的任务
分享
#include <string>
using namespace std;
case WM_PAINT:
{
hdc = BeginPaint(hWnd, &ps);
wstring str = L"abcdefg";
//TextOut(hdc,0,0,str.data(),str.size()); // 可以输出
RECT Rect;
Rect.left = 0;
Rect.top = 0;
Rect.right = 1335;
Rect.bottom = 868;
//SetMapMode(hdc,MM_HIENGLISH); // 有没有都是不行!
// 死活不行!
DrawText(hdc,str.data(),str.size(),&Rect,DT_CALCRECT|TA_LEFT|TA_TOP|TA_NOUPDATECP);
// 直接写出文本也不行
DrawText(hdc,L"abcdefg",7,&Rect,DT_CALCRECT|TA_LEFT|TA_TOP|TA_NOUPDATECP);
EndPaint(hWnd, &ps);
break;
}