主题:求助
void CClockShow::OnPaint()
{
CPaintDC dc(this);
CDC *pDC = new CDC;
pDC->CreateCompatibleDC(&dc);
CRect rc;
GetClientRect(&rc);
pDC->MoveTo(0,0);
pDC->LineTo(10,10);
dc.BitBlt((rc.Width()-20)/2,0,rc.right-rc.left,rc.bottom-rc.top,pDC,0,0,
SRCCOPY);
}
为什么这样没有显示啊?
{
CPaintDC dc(this);
CDC *pDC = new CDC;
pDC->CreateCompatibleDC(&dc);
CRect rc;
GetClientRect(&rc);
pDC->MoveTo(0,0);
pDC->LineTo(10,10);
dc.BitBlt((rc.Width()-20)/2,0,rc.right-rc.left,rc.bottom-rc.top,pDC,0,0,
SRCCOPY);
}
为什么这样没有显示啊?