以下是onpaint中的代码
CPaintDC dc(this); // device context for painting

CxImage image;
CxImage image1;
CxImage image2;
CxImage image3;
CxImage image4;
CxImage image5;
bool bRet = image.Load("F:\\vc workplace\\VirtualEarthquakePlay\\background1.jpg");
bool aRet = image1.Load("F:\\vc workplace\\VirtualEarthquakePlay\\标识1.jpg");
bool cRet = image2.Load("F:\\vc workplace\\VirtualEarthquakePlay\\标识1.jpg");
bool dRet = image3.Load("F:\\vc workplace\\VirtualEarthquakePlay\\标识1.jpg");
bool eRet = image4.Load("F:\\vc workplace\\VirtualEarthquakePlay\\标识1.jpg");
bool fRet = image5.Load("F:\\vc workplace\\VirtualEarthquakePlay\\标识1.jpg");
if (bRet&&aRet&&cRet&&dRet&&eRet&&fRet)
{
long lRet = image.Draw(dc.GetSafeHdc(),0,0,1360,768,NULL);
long aRet = image1.Draw(dc.GetSafeHdc(),36,128,56,56,NULL);
long cRet = image2.Draw(dc.GetSafeHdc(),108,128,56,56,NULL);
long dRet = image3.Draw(dc.GetSafeHdc(),180,128,56,56,NULL);
long eRet = image4.Draw(dc.GetSafeHdc(),252,128,56,56,NULL);
long fRet = image5.Draw(dc.GetSafeHdc(),324,128,56,56,NULL);
}

解决方案 »

  1.   

    那说明你设置的rect有问题!
    你设置的rect可能大于clientrect了!
    你rect都设置小些!
    可以这样,先GetClientRect,然后分割成好几块。
      

  2.   

    任务栏没自动隐藏  我那个程序是全屏的 把任务栏也覆盖了  偶尔就会出现程序下面被覆盖了一小块 tab切换一下在切换回来又显示出来了0 0  我这个程序跟任务栏没关系   就是需要全屏幕  
      

  3.   

    你在OnDraw中只放置image.draw语句,其他语句别放在这个函数里
      

  4.   

    CPaintDC dc(this); 
    不要用这个DC ,用屏幕DC试试?