C++ 然后是Cimage.Draw()

C++ 然后是Cimage.Draw(),c++,mfc,C++,Mfc,我尝试使用以下方法创建移动PNG对象的小动画: pDC -> GetWindow() -> InvalidateRect(lpRect); // Clear old Draw() image.Draw(pDC -> GetSafeHdc(),MyBmpFile::Instance() -> getxDest(), MyBmpFile::Instance() -> getyDest(),50,50); // Draw my CImage MyBmpFile::Inst

我尝试使用以下方法创建移动PNG对象的小动画:

pDC -> GetWindow() -> InvalidateRect(lpRect); // Clear old Draw()
image.Draw(pDC -> GetSafeHdc(),MyBmpFile::Instance() -> getxDest(), MyBmpFile::Instance() -> getyDest(),50,50); // Draw my CImage
MyBmpFile::Instance() -> Update(pDC); // change xDest, yDest to new one, and move lpRect to new position

只要我不使用无效的PNG是绘图,但我需要清除旧的之前,我画下一个。编译上述代码时,我的对话框窗口中没有任何内容。

确定答案很简单:


我只需要在失效后更新Windows

你应该写下你的答案作为答案,把问题标记为已回答。好的,完成。谢谢你的建议。