BOOL TextOut( HDC hdc, // handle to device context int nXStart, // x-coordinate of starting position int nYStart, // y-coordinate of starting position LPCTSTR lpString, // pointer to string int cbString // number of characters in string ); virtual BOOL TextOut( int x, int y, LPCTSTR lpszString, int nCount );BOOL TextOut( int x, int y, const CString& str );以上是TextOut的三个原型, 呵呵, 想用那一个API: HDC hDC = GetDC(hWnd); TextOut(hDC, x, y, "string", strlen("string")); ReleaseDC(hDC); MFC: 他们讲了
pDC->TestOut(0,0,“hi”);
pDC->TextOut(x,y,“hi”);
HDC hdc, // handle to device context
int nXStart, // x-coordinate of starting position
int nYStart, // y-coordinate of starting position
LPCTSTR lpString, // pointer to string
int cbString // number of characters in string
);
virtual BOOL TextOut( int x, int y, LPCTSTR lpszString, int nCount );BOOL TextOut( int x, int y, const CString& str );以上是TextOut的三个原型, 呵呵, 想用那一个API:
HDC hDC = GetDC(hWnd);
TextOut(hDC, x, y, "string", strlen("string"));
ReleaseDC(hDC);
MFC:
他们讲了