X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfcb9d7cafa8129dff24e4f49af21bccabed2262..f973828cd9b31d3b80386fab5e6f7c4a106d97fc:/docs/latex/wx/app.tex

diff --git a/docs/latex/wx/app.tex b/docs/latex/wx/app.tex
index 37214ede08..d02fd5a8cb 100644
--- a/docs/latex/wx/app.tex
+++ b/docs/latex/wx/app.tex
@@ -322,12 +322,16 @@ Return {\tt true} to continue normal execution or {\tt false} to return
 
 \membersection{wxApp::OnExit}\label{wxapponexit}
 
-\func{int}{OnExit}{\void}
+\func{virtual int}{OnExit}{\void}
 
-Provide this member function for any processing which needs to be
+Override this member function for any processing which needs to be
 done as the application is about to exit. OnExit is called after
 destroying all application windows and controls, but before
-wxWindows cleanup.
+wxWindows cleanup. Note that it is not called at all if 
+\helpref{OnInit}{wxapponinit} failed.
+
+The return value of this function is currently ignored, return the same value
+as returned by the base class method if you override it.
 
 
 \membersection{wxApp::OnFatalException}\label{wxapponfatalexception}
@@ -345,7 +349,7 @@ work and, in fact, probably won't.
 
 \wxheading{See also}
 
-\helpref{wxHandleFatalExcetions}{wxhandlefatalexceptions}
+\helpref{wxHandleFatalExceptions}{wxhandlefatalexceptions}
 
 %% VZ: the wxApp event handler are private and should not be documented here!
 %%
@@ -405,13 +409,16 @@ work and, in fact, probably won't.
 
 This must be provided by the application, and will usually create the
 application's main window, optionally calling 
-\helpref{wxApp::SetTopWindow}{wxappsettopwindow}.
+\helpref{wxApp::SetTopWindow}{wxappsettopwindow}. You may use 
+\helpref{OnExit}{wxapponexit} to clean up anything initialized here, provided
+that the function returns \true.
 
 Notice that if you want to to use the command line processing provided by
 wxWindows you have to call the base class version in the derived class
 OnInit().
 
-Return true to continue processing, false to exit the application.
+Return \true to continue processing, \false to exit the application
+immediately.
 
 
 \membersection{wxApp::OnInitCmdLine}\label{wxapponinitcmdline}
@@ -455,9 +462,7 @@ Under Windows, OnQueryEndSession is called in response to the WM\_QUERYENDSESSIO
 \wxheading{See also}
 
 \helpref{wxWindow::Close}{wxwindowclose},\rtfsp
-\helpref{wxCloseEvent}{wxcloseevent}
-%% GD: OnXXX functions are not documented
-%%\helpref{wxApp::OnEndSession}{wxapponendsession}
+\helpref{wxCloseEvent}{wxcloseevent}\rtfsp
 
 
 \membersection{wxApp::OnRun}\label{wxapponrun}
@@ -472,6 +477,9 @@ the last frame has been deleted and
 \helpref{GetExitOnFrameDelete}{wxappgetexitonframedelete} flag is \true (this
 is the default).
 
+The return value of this function becomes the exit code of the program, so it
+should return $0$ in case of successful termination.
+
 
 \membersection{wxApp::OnUnhandledException}\label{wxapponunhandledexception}
 
