windows can not show a dialog, it looks like GDI error

  • Thread starter Thread starter Jacky Zhou
  • Start date Start date
J

Jacky Zhou

Guest
I write one app with VS2012 in windows 7, if the app runs over than 1 day, now just click a button to show a simple dialog, it becomes very slowly, it shows the window after more than 30 seconds. But if I press alt key in keyboard, the dialog is displayed immediately. it seems the windows message is stuck.

I use a class named CCylinderProgressCtrlST public CProgressCtrl and download it from internet. I guess maybe the problem is at Gdiplus

I delete other code in CCylinderProgressCtrlST::DrawItem, its now

void CCylinderProgressCtrlST::DrawItem(CDC* pDC, Graphics* pGfx)
{
CRect rCtrl;

GetClientRect(rCtrl);

Bitmap image(rCtrl.Width(), rCtrl.Height());

// Draw image on screen
pGfx->DrawImage(&image, 0, 0);
} // End of DrawItem


its still has the same problem. So I guess its pGfx->DrawImage problem, but I do not know how to fix it.

Please see http://stackoverflow.com/q/17640642/2430839 for detail information

If you need the source code to debug, please contact me.

Thanks advanced

Continue reading...
 
Back
Top