virtual BOOL TextOut(
int x,
int y,
LPCTSTR lpszString,
int nCount
);
BOOL TextOut(
int x,
int y,
const CString& str
);
WM_LBUTTONDOWN: {
hdc = BeginPaint(hWnd, &ps);
UINT x = lParam;
UINT y = wParam;
//LPSTR info;
//sprintf(info, "(%d, %d)", x, y);
std::string s1("( " + x);
std::string s2(" , ");
std::string s3(y + " )");
std::string str = s1 + s2 + s3;
TextOut(hdc, 50, 50,
(LPCWSTR)(str.c_str()), 6);
}
break;string 转 LPCWSTR
原文:http://blog.csdn.net/haimian520/article/details/46047393