App still running in background after closing... 
Author Message
 App still running in background after closing...

Hi,
I've noticed that my application continues to run in the bg after
I close it ( ie.  it is visible in the task manager under processes, but not
under applications).
Are there any typical causes for this? What should i be checking for ?
Thanks,
Mike


Sun, 11 Sep 2005 15:52:51 GMT  
 App still running in background after closing...
Perhaps a thread is still active or a hidden window is still processing
messages. May I ask what kind of application this is? Is it an MFC app? And
if so is it dialog based, SDI...?

Regards,
Nish [VC++ MVP]


Quote:
> Hi,
> I've noticed that my application continues to run in the bg after
> I close it ( ie.  it is visible in the task manager under processes, but
not
> under applications).
> Are there any typical causes for this? What should i be checking for ?
> Thanks,
> Mike



Sun, 11 Sep 2005 17:07:34 GMT  
 App still running in background after closing...


Quote:
> Perhaps a thread is still active or a hidden window is still processing
> messages. May I ask what kind of application this is? Is it an MFC app?
And
> if so is it dialog based, SDI...?

Hi,
Yes, it's an MFC app. MDI.
I have some code for switching views. If I toggle the views in the
application, the problem occurs. If I toggle the views, THEN close the
document before exiting from the app, I don't have the problem.
So, the problem only occurs when I toggle views, then close the app while
the document is still open.

Unfortunately I am new to this, so while it seems to be a problem with the
destruction of the new view, I'm not sure how to fix it...

Thanks for any suggestions!
Mike



Sun, 11 Sep 2005 16:45:27 GMT  
 App still running in background after closing...


Quote:



> > Perhaps a thread is still active or a hidden window is still processing
> > messages. May I ask what kind of application this is? Is it an MFC app?
> And
> > if so is it dialog based, SDI...?

> Hi,
> Yes, it's an MFC app. MDI.
> I have some code for switching views. If I toggle the views in the
> application, the problem occurs. If I toggle the views, THEN close the
> document before exiting from the app, I don't have the problem.
> So, the problem only occurs when I toggle views, then close the app while
> the document is still open.

> Unfortunately I am new to this, so while it seems to be a problem with the
> destruction of the new view, I'm not sure how to fix it...

> Thanks for any suggestions!
> Mike

The problem seemed to be that the app's Doc class was derived from
CRichEditDoc.  I chose to do this becase one of my Views is a splitter
window with a CRichEditView in one pane.

I put in a new Doc class just derived from CDocument, and made it the
default doc. This solved the previous bug - but does it mean I will have
difficulty using OLE with the CRichEditView derived View?

If so, is there a way round this problem?

Perhaps I should reiterate that I am a newbie, so any guidance is useful.

Thanks,
Mike



Sun, 11 Sep 2005 20:42:56 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. App still running in background after closing?

2. Help with running app in background

3. closing other running apps

4. HELP - NT SysTray Clock Hangs when changing time and background threads running in my app

5. Help with running app in background

6. Let an app run in background ???

7. App Continues To Run After Closing

8. running win32 apps and dos apps from a menu app

9. main app closes while dll module closes

10. evc++ and building apps to run on iPAQ running PPC3.0

11. running app from another app

12. Run console app from within my gui app

 

 
Powered by phpBB® Forum Software