\rtfsp{\it OnInit} will usually create a top window as a bare minimum.
Unlike in earlier versions of wxWindows, OnInit does not return a frame. Instead it
-returns a boolean value which indicates whether processing should continue (TRUE) or not (FALSE).
+returns a boolean value which indicates whether processing should continue (true) or not (false).
You call \helpref{wxApp::SetTopWindow}{wxappsettopwindow} to let wxWindows know
about the top window.
{
wxFrame *the_frame = new wxFrame(NULL, ID_MYFRAME, argv[0]);
...
- the_frame->Show(TRUE);
+ the_frame->Show(true);
SetTopWindow(the_frame);
- return TRUE;
+ return true;
}
\end{verbatim}
construction time.
You can also use DECLARE\_APP(appClass) in a header file to declare the wxGetApp function which returns
-a reference to the application object.
+a reference to the application object. Otherwise you can only use the global
+\texttt{wxTheApp} pointer which is of type \texttt{wxApp *}.
+
\subsection{Application shutdown}\label{wxappshutdownoverview}