同样一段代码,我放在按钮里面好使,但放在初始化函数或用初始化函数调用按钮都不行。这是为什么呢?
函数为绘制图片,主要代码如下:
                  UpdateData(TRUE);
                  CRect rc;
                  CDC* pDC = m_Picture_Dlg.GetDC();
                  m_Picture_Dlg.GetClientRect(&rc);
pDC->SetViewportOrg(0, rc.bottom);
rc.bottom = -rc.bottom;
if (!picture)
{
picture = new CPicture;
}
picture->Load(tmp1);
picture->Render(pDC, &rc, NULL);
对VC不太懂啊,求帮忙啊!!!!