- wxTheApp = (wxApp *)this;
-
-#if WXWIN_COMPATIBILITY_2_2
- m_wantDebugOutput = FALSE;
-#endif // WXWIN_COMPATIBILITY_2_2
-
-#if wxUSE_GUI
- m_topWindow = (wxWindow *)NULL;
- m_useBestVisual = FALSE;
- m_exitOnFrameDelete = TRUE;
- m_isActive = TRUE;
-#endif // wxUSE_GUI
-
-#ifdef __WXDEBUG__
- SetTraceMasks();
-#endif
+ m_topWindow = NULL;
+
+ m_useBestVisual = false;
+ m_forceTrueColour = false;
+
+ m_isActive = true;
+
+ // We don't want to exit the app if the user code shows a dialog from its
+ // OnInit() -- but this is what would happen if we set m_exitOnFrameDelete
+ // to Yes initially as this dialog would be the last top level window.
+ // OTOH, if we set it to No initially we'll have to overwrite it with Yes
+ // when we enter our OnRun() because we do want the default behaviour from
+ // then on. But this would be a problem if the user code calls
+ // SetExitOnFrameDelete(false) from OnInit().
+ //
+ // So we use the special "Later" value which is such that
+ // GetExitOnFrameDelete() returns false for it but which we know we can
+ // safely (i.e. without losing the effect of the users SetExitOnFrameDelete
+ // call) overwrite in OnRun()
+ m_exitOnFrameDelete = Later;