我在OnPaint函数中写了如下代码,为什么在指定的静态文本框中画不出背景和直线        CWnd*pWnd=GetDlgItem(IDC_STATIC_DRAW);//IDC_STATIC_DRAW为静态文本框的ID
        CDC*pDC=pWnd->GetDC();


CRect rect;
pWnd->GetClientRect (&rect);
int nWidth = rect.Width ();
int nHeight = rect.Height ();
CBrush brush(RGB(100, 100, 255));
pDC->FillRect(&rect, &brush); pDC->MoveTo(10,10);
pDC->LineTo(20,200);
谢谢!