Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I override "OnExit"

Status
Not open for further replies.

panioti

Programmer
Jan 5, 2005
15
US
What happens when operator clicks File->Exit, or hits the "X" button in upper-rt corner (whats the name of this X function).

I want to do some cleanup before allowing exit to proceed. Is there a message that can be intercepted.
 
The are several places that might be used for cleanup. Which is the most suitable depends on you application, and the scope of the clean-up.

If it's a doc-view, then it could be in the document's DeleteContents method, or destructor. Or in the view's OnDestroy or destructor.

It could be in the CWinApp's ExitInstance, or destructor.



/Per
[sub]
www.perfnurt.se[/sub]
 
CWinApp ExitInstance is what I was looking for, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top