![]() |
App Doesn't close! |
Post Reply
|
| Author | |
ContactGT
Newbie
Joined: 30 October 2006 Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Topic: App Doesn't close!Posted: 12 December 2006 at 8:10am |
|
I am having trouble figuring out why my application won't close! I have overridden the CMainFrame::OnClose() method, but I only save my toolbar info and view info to the registry then pass on the call to CXTPMDIFrameWnd::OnClose(); This code all runs just fine. The application window closes, but the application remains on the task list and I have to kill it manually - same in debug mode - everything seems to close just fine, but I have to press the Stop Debugging button to close the application.
Anyone know what do I need to step into to figure out what is failing - there is nothing added to the Output window during close?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 December 2006 at 9:52am |
|
Hi,
Check if CWinApp::ExitInstance was called.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ContactGT
Newbie
Joined: 30 October 2006 Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 December 2006 at 10:06am |
|
ExitInstance is nowhere in my code - where should I call CWinApp::ExitInstance()? In the MainFrame::OnClose()? |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 December 2006 at 1:56pm |
|
Hi,
Set breakpoint in MFC's CWinApp::ExitInstance
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ContactGT
Newbie
Joined: 30 October 2006 Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 December 2006 at 2:41pm |
|
The breakpoint is never hit, so this method is never called. I don't have to call this method in my other applications, so any idea why this might be hapenning here?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 December 2006 at 1:16am |
|
Hi,
I think CMainFrame never destroyed.... try also set breakpoint in destructor of CMainFrame. May be you have some exception or something... Impossible to say without code.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ContactGT
Newbie
Joined: 30 October 2006 Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 December 2006 at 5:14am |
|
Thank you for your help. Problem was that in the Document I had added a AfxOleLockApp() call, but I forgot to AfxOleUnlockApp()! All OK now
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |