Link to home
Start Free TrialLog in
Avatar of clintMon
clintMon

asked on

Program Crash When Program minimized

I have a C++ MFC application.  I recently started having the following problem: if I leave it running in the background (minimized ) for 10 or 15 minutes, when I eventually come back to it (select it in the taskbar), my application's windows draw very strangely, and the program crashes. By "strange", I mean that the windows that should be positioned at the bottom of the screen draw at the top, but without borders, when I select menu items, a dialog displays with another window inside it (that isn't supposed to be there), etc.  I get assert error messages also.  

I must note that this problem does NOT happen if I leave my application running and keep it in focus (ie, I DON'T minimize it).

Any help would be greatly appreciated.

ASKER CERTIFIED SOLUTION
Avatar of bikvi_sibro
bikvi_sibro

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of clintMon
clintMon

ASKER

When you say "refresh process", what specifically do you mean?  Window redrawing?  OnSetActive() routines?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oops.. hit submit by mistake ..

You should be attaching the debugger when the assert/crash happens and  check the stack trace.
5) As bikvi_sibro suggested, start the app from the debugger and see what happens.

good luck.