64,683
社区成员
发帖
与我相关
我的任务
分享
void CTextView::OnDraw(CDC* pDC) //响应wm_paint消息
{
CTextDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
m_str = CString("我是写在OnDraw函数之中");
HDC hdc;
PAINTSTRUCT ps;
hdc = ::BeginPaint(m_hWnd,&ps);
::TextOut(hdc,0,45,m_str,strlen(m_str));
::EndPaint(m_hWnd,&ps);
// pDC->TextOut(0,0,m_str);