be destroyed for the application to exit, it is advisable to use parent
frames wherever possible when creating new frames, so that deleting the
top level frame will automatically delete child frames. The alternative
-is to explicitly delete child frames in the top-level frame's \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow}\rtfsp
+is to explicitly delete child frames in the top-level frame's \helpref{wxCloseEvent}{wxcloseevent}\rtfsp
handler.
In emergencies the \helpref{wxExit}{wxexit} function can be called to kill the
An example of defining an application follows:
\begin{verbatim}
-class DerivedApp: public wxApp
+class DerivedApp : public wxApp
{
- public:
- bool OnInit(void);
+public:
+ virtual bool OnInit();
};
IMPLEMENT_APP(DerivedApp)
-bool DerivedApp::OnInit(void)
+bool DerivedApp::OnInit()
{
wxFrame *the_frame = new wxFrame(NULL, argv[0]);
...