为什么画的图形一闪而过了?
情况描述: Dialog上的picture控件上的bmp图片上画线
bmp图片已经加载好了,而后画线
void CPictureWnd::OnPaint()
{
CPaintDC dc(this); // device context for painting
CWnd *pWnd = GetDlgItem(IDD_DIALOG_ACCPWD);
CDC *pDC = pWnd->GetDC();
pDC->SelectStockObject(BLACK_BRUSH);
pDC->LineTo(500,500);
pDC->Ellipse(CRect(0,20,100,120));
pDC->SetPixel(30,30,0);
}
可是为什么画的图形一闪而过了?
请教高手