Remove calls to wxApp::SetTopWindow() from the samples and documentation.
It is definitely not necessary to call SetTopWindow() when there is only a single top level window and it is arguable whether it's useful to do it even when there are many of them so don't encourage its use in the documentation and also remove all its occurrences from the samples. Closes #12816. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -163,9 +163,8 @@ bool LifeApp::OnInit()
|
|||||||
// create the main application window
|
// create the main application window
|
||||||
LifeFrame *frame = new LifeFrame();
|
LifeFrame *frame = new LifeFrame();
|
||||||
|
|
||||||
// show it and tell the application that it's our main window
|
// show it
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// just for Motif
|
// just for Motif
|
||||||
#ifdef __WXMOTIF__
|
#ifdef __WXMOTIF__
|
||||||
|
@@ -27,8 +27,7 @@ the wxApp::OnInit member defined for a class derived from wxApp.
|
|||||||
@e OnInit will usually create a top window as a bare minimum. Unlike in earlier
|
@e OnInit will usually create a top window as a bare minimum. Unlike in earlier
|
||||||
versions of wxWidgets, OnInit does not return a frame. Instead it returns a
|
versions of wxWidgets, OnInit does not return a frame. Instead it returns a
|
||||||
boolean value which indicates whether processing should continue (@true) or not
|
boolean value which indicates whether processing should continue (@true) or not
|
||||||
(@false). You call wxApp::SetTopWindow to let wxWidgets know about the top
|
(@false).
|
||||||
window.
|
|
||||||
|
|
||||||
Note that the program's command line arguments, represented by @e argc and
|
Note that the program's command line arguments, represented by @e argc and
|
||||||
@e argv, are available from within wxApp member functions.
|
@e argv, are available from within wxApp member functions.
|
||||||
@@ -59,7 +58,6 @@ bool DerivedApp::OnInit()
|
|||||||
wxFrame *the_frame = new wxFrame(NULL, ID_MYFRAME, argv[0]);
|
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;
|
||||||
}
|
}
|
||||||
|
@@ -124,7 +124,6 @@ bool MyApp::OnInit()
|
|||||||
{
|
{
|
||||||
MyFrame *frame = new MyFrame( "Hello World", wxPoint(50,50), wxSize(450,340) );
|
MyFrame *frame = new MyFrame( "Hello World", wxPoint(50,50), wxSize(450,340) );
|
||||||
frame->Show( true );
|
frame->Show( true );
|
||||||
SetTopWindow( frame );
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
|
@@ -206,8 +206,6 @@ python DialogUnits.py
|
|||||||
62: frame = MyFrame(NULL, -1, "This is a test")
|
62: frame = MyFrame(NULL, -1, "This is a test")
|
||||||
63: frame.Show(true)
|
63: frame.Show(true)
|
||||||
64:
|
64:
|
||||||
65: # Tell wxWidgets that this is our main window
|
|
||||||
66: self.SetTopWindow(frame)
|
|
||||||
67:
|
67:
|
||||||
68: # Return a success flag
|
68: # Return a success flag
|
||||||
69: return true
|
69: return true
|
||||||
@@ -257,8 +255,7 @@ Destroy() method as shown on line 36.
|
|||||||
|
|
||||||
Just like wxWidgets in C++, wxPython apps need to create a class derived from
|
Just like wxWidgets in C++, wxPython apps need to create a class derived from
|
||||||
@c wxApp (line 56) that implements a method named @c OnInit, (line 59.) This
|
@c wxApp (line 56) that implements a method named @c OnInit, (line 59.) This
|
||||||
method should create the application's main window (line 62) and use
|
method should create the application's main window (line 62) and show it.
|
||||||
wxApp.SetTopWindow() (line 66) to inform wxWidgets about it.
|
|
||||||
|
|
||||||
And finally, at line 72 an instance of the application class is created. At
|
And finally, at line 72 an instance of the application class is created. At
|
||||||
this point wxPython finishes initializing itself, and calls the @c OnInit
|
this point wxPython finishes initializing itself, and calls the @c OnInit
|
||||||
|
@@ -102,8 +102,6 @@ bool MyApp::OnInit()
|
|||||||
wxDEFAULT_FRAME_STYLE);
|
wxDEFAULT_FRAME_STYLE);
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -570,7 +570,6 @@ bool MyApp::OnInit()
|
|||||||
wxT("wxAUI Sample Application"),
|
wxT("wxAUI Sample Application"),
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxSize(800, 600));
|
wxSize(800, 600));
|
||||||
SetTopWindow(frame);
|
|
||||||
frame->Show();
|
frame->Show();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -119,7 +119,6 @@ bool MyApp::OnInit()
|
|||||||
// create the main program window
|
// create the main program window
|
||||||
MyFrame *frame = new MyFrame;
|
MyFrame *frame = new MyFrame;
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// use our config object...
|
// use our config object...
|
||||||
if ( pConfig->Read(wxT("/Controls/Check"), 1l) != 0 ) {
|
if ( pConfig->Read(wxT("/Controls/Check"), 1l) != 0 ) {
|
||||||
|
@@ -242,7 +242,6 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
MyFrame *frame =
|
MyFrame *frame =
|
||||||
new MyFrame(NULL, "wxDataViewCtrl sample", 40, 40, 1000, 540);
|
new MyFrame(NULL, "wxDataViewCtrl sample", 40, 40, 1000, 540);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
return true;
|
return true;
|
||||||
|
@@ -161,9 +161,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(wxT("Dial-up wxWidgets demo"),
|
MyFrame *frame = new MyFrame(wxT("Dial-up wxWidgets demo"),
|
||||||
wxPoint(50, 50), wxSize(450, 340));
|
wxPoint(50, 50), wxSize(450, 340));
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// Init dial up manager
|
// Init dial up manager
|
||||||
m_dial = wxDialUpManager::Create();
|
m_dial = wxDialUpManager::Create();
|
||||||
|
@@ -231,7 +231,6 @@ bool MyApp::OnInit()
|
|||||||
frame->Centre();
|
frame->Centre();
|
||||||
frame->Show();
|
frame->Show();
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -347,9 +347,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(wxT("Drawing sample"),
|
MyFrame *frame = new MyFrame(wxT("Drawing sample"),
|
||||||
wxDefaultPosition, wxSize(550, 840));
|
wxDefaultPosition, wxSize(550, 840));
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
if ( !LoadImages() )
|
if ( !LoadImages() )
|
||||||
{
|
{
|
||||||
|
@@ -413,9 +413,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(wxT("Exec wxWidgets sample"),
|
MyFrame *frame = new MyFrame(wxT("Exec wxWidgets sample"),
|
||||||
wxDefaultPosition, wxSize(500, 140));
|
wxDefaultPosition, wxSize(500, 140));
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// success: wxApp::OnRun() will be called which will enter the main message
|
// success: wxApp::OnRun() will be called which will enter the main message
|
||||||
// loop and the application will run. If we returned false here, the
|
// loop and the application will run. If we returned false here, the
|
||||||
|
@@ -282,9 +282,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(wxT("Font wxWidgets demo"),
|
MyFrame *frame = new MyFrame(wxT("Font wxWidgets demo"),
|
||||||
wxPoint(50, 50), wxSize(600, 400));
|
wxPoint(50, 50), wxSize(600, 400));
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// success: wxApp::OnRun() will be called which will enter the main message
|
// success: wxApp::OnRun() will be called which will enter the main message
|
||||||
// loop and the application will run. If we returned 'false' here, the
|
// loop and the application will run. If we returned 'false' here, the
|
||||||
|
@@ -324,7 +324,6 @@ bool MyApp::OnInit()
|
|||||||
#endif // !USE_SIMPLE_HELP_PROVIDER
|
#endif // !USE_SIMPLE_HELP_PROVIDER
|
||||||
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// initialise the help system: this means that we'll use doc.hlp file under
|
// initialise the help system: this means that we'll use doc.hlp file under
|
||||||
// Windows and that the HTML docs are in the subdirectory doc for platforms
|
// Windows and that the HTML docs are in the subdirectory doc for platforms
|
||||||
|
@@ -127,11 +127,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(_("HTML Help Sample"),
|
MyFrame *frame = new MyFrame(_("HTML Help Sample"),
|
||||||
wxDefaultPosition, wxDefaultSize);
|
wxDefaultPosition, wxDefaultSize);
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
// @@@ what does it do exactly, in fact? is it necessary here?
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
|
|
||||||
// success: wxApp::OnRun() will be called which will enter the main message
|
// success: wxApp::OnRun() will be called which will enter the main message
|
||||||
// loop and the application will run. If we returned false here, the
|
// loop and the application will run. If we returned false here, the
|
||||||
|
@@ -152,11 +152,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(_("Printing test"),
|
MyFrame *frame = new MyFrame(_("Printing test"),
|
||||||
wxDefaultPosition, wxSize(640, 480));
|
wxDefaultPosition, wxSize(640, 480));
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
// @@@ what does it do exactly, in fact? is it necessary here?
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
|
|
||||||
// success: wxApp::OnRun() will be called which will enter the main message
|
// success: wxApp::OnRun() will be called which will enter the main message
|
||||||
// loop and the application will run. If we returned false here, the
|
// loop and the application will run. If we returned false here, the
|
||||||
|
@@ -169,10 +169,9 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(_("wxHtmlWindow testing application"),
|
MyFrame *frame = new MyFrame(_("wxHtmlWindow testing application"),
|
||||||
wxDefaultPosition, wxSize(640, 480));
|
wxDefaultPosition, wxSize(640, 480));
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
// @@@ what does it do exactly, in fact? is it necessary here?
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
wxFileSystem::AddHandler(new MyVFS);
|
wxFileSystem::AddHandler(new MyVFS);
|
||||||
|
|
||||||
// success: wxApp::OnRun() will be called which will enter the main message
|
// success: wxApp::OnRun() will be called which will enter the main message
|
||||||
|
@@ -162,10 +162,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame( _("wxHtmlWindow testing application"),
|
MyFrame *frame = new MyFrame( _("wxHtmlWindow testing application"),
|
||||||
wxDefaultPosition, wxSize(640, 480) );
|
wxDefaultPosition, wxSize(640, 480) );
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
// @@@ what does it do exactly, in fact? is it necessary here?
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// success: wxApp::OnRun() will be called which will enter the main message
|
// success: wxApp::OnRun() will be called which will enter the main message
|
||||||
// loop and the application will run. If we returned false here, the
|
// loop and the application will run. If we returned false here, the
|
||||||
|
@@ -123,10 +123,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(_("wxHtmlWindow testing application"),
|
MyFrame *frame = new MyFrame(_("wxHtmlWindow testing application"),
|
||||||
wxDefaultPosition, wxSize(640, 480) );
|
wxDefaultPosition, wxSize(640, 480) );
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
// @@@ what does it do exactly, in fact? is it necessary here?
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// success: wxApp::OnRun() will be called which will enter the main message
|
// success: wxApp::OnRun() will be called which will enter the main message
|
||||||
// loop and the application will run. If we returned false here, the
|
// loop and the application will run. If we returned false here, the
|
||||||
|
@@ -271,7 +271,6 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
// Show the frame
|
// Show the frame
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -89,8 +89,6 @@ bool MyApp::OnInit()
|
|||||||
frame->CenterOnScreen();
|
frame->CenterOnScreen();
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -100,8 +100,6 @@ bool MyApp::OnInit()
|
|||||||
// Show the frame
|
// Show the frame
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -365,8 +365,6 @@ bool MyApp::OnInit()
|
|||||||
frame->SetStatusText(wxT("Welcome to wxWidgets menu sample"));
|
frame->SetStatusText(wxT("Welcome to wxWidgets menu sample"));
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,9 +67,6 @@ bool MyApp::OnInit(void)
|
|||||||
frame->panel = new wxWindow(frame, wxID_ANY, wxPoint(0, 0), wxSize(400, 400), 0, wxT("MyMainFrame"));
|
frame->panel = new wxWindow(frame, wxID_ANY, wxPoint(0, 0), wxSize(400, 400), 0, wxT("MyMainFrame"));
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
// Return the main frame window
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -47,7 +47,6 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
// Create the main window
|
// Create the main window
|
||||||
MyFrame *frame = new MyFrame();
|
MyFrame *frame = new MyFrame();
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// Problem with generic wxNotebook implementation whereby it doesn't size
|
// Problem with generic wxNotebook implementation whereby it doesn't size
|
||||||
// properly unless you set the size again
|
// properly unless you set the size again
|
||||||
|
@@ -132,10 +132,8 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame(wxT("OleAuto wxWidgets App"),
|
MyFrame *frame = new MyFrame(wxT("OleAuto wxWidgets App"),
|
||||||
wxPoint(50, 50), wxSize(450, 340));
|
wxPoint(50, 50), wxSize(450, 340));
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
// @@@ what does it do exactly, in fact? is it necessary here?
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// success: wxApp::OnRun() will be called which will enter the main message
|
// success: wxApp::OnRun() will be called which will enter the main message
|
||||||
// loop and the application will run. If we returned false here, the
|
// loop and the application will run. If we returned false here, the
|
||||||
|
@@ -57,7 +57,7 @@ bool MyApp::OnInit()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Create the main frame window
|
// Create the main frame window
|
||||||
SetTopWindow(new MyFrame(NULL, wxT("wxWidgets OpenGL Isosurf Sample")));
|
MyFrame *frame = new MyFrame(NULL, wxT("wxWidgets OpenGL Isosurf Sample"));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -97,8 +97,6 @@ bool OwnerDrawnApp::OnInit(void)
|
|||||||
= new OwnerDrawnFrame(NULL, wxT("wxWidgets Ownerdraw Sample"),
|
= new OwnerDrawnFrame(NULL, wxT("wxWidgets Ownerdraw Sample"),
|
||||||
50, 50, 450, 340);
|
50, 50, 450, 340);
|
||||||
|
|
||||||
SetTopWindow(pFrame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -123,8 +123,6 @@ bool MyApp::OnInit(void)
|
|||||||
frame->Centre(wxBOTH);
|
frame->Centre(wxBOTH);
|
||||||
frame->Show();
|
frame->Show();
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -326,8 +326,6 @@ bool RegApp::OnInit()
|
|||||||
RegFrame *frame = new RegFrame(NULL, wxT("wxRegTest"), 50, 50, 600, 350);
|
RegFrame *frame = new RegFrame(NULL, wxT("wxRegTest"), 50, 50, 600, 350);
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -139,7 +139,6 @@ bool MyApp::OnInit()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxFrame* frame = new MyFrame;
|
wxFrame* frame = new MyFrame;
|
||||||
SetTopWindow(frame);
|
|
||||||
frame->Show();
|
frame->Show();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -79,8 +79,6 @@ bool MyApp::OnInit(void)
|
|||||||
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -190,9 +190,8 @@ bool MyApp::OnInit()
|
|||||||
// Create the main application window
|
// Create the main application window
|
||||||
MyFrame *frame = new MyFrame();
|
MyFrame *frame = new MyFrame();
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// success
|
// success
|
||||||
return true;
|
return true;
|
||||||
|
@@ -162,9 +162,8 @@ bool MyApp::OnInit()
|
|||||||
// Create the main application window
|
// Create the main application window
|
||||||
MyFrame *frame = new MyFrame();
|
MyFrame *frame = new MyFrame();
|
||||||
|
|
||||||
// Show it and tell the application that it's our main window
|
// Show it
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// Success
|
// Success
|
||||||
return true;
|
return true;
|
||||||
|
@@ -226,7 +226,6 @@ bool App::OnInit () {
|
|||||||
// open application frame
|
// open application frame
|
||||||
m_frame->Layout ();
|
m_frame->Layout ();
|
||||||
m_frame->Show (true);
|
m_frame->Show (true);
|
||||||
SetTopWindow (m_frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -160,8 +160,6 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -545,8 +545,6 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
// report success
|
// report success
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -315,8 +315,6 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -198,7 +198,6 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
// Show the frame
|
// Show the frame
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -116,8 +116,6 @@ bool MyApp::OnInit()
|
|||||||
// Show the frame
|
// Show the frame
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -136,7 +136,7 @@ bool MyApp::OnInit()
|
|||||||
MyFrame *frame = new MyFrame((wxFrame *) NULL, wxT("Validator Test"),
|
MyFrame *frame = new MyFrame((wxFrame *) NULL, wxT("Validator Test"),
|
||||||
50, 50, 300, 250);
|
50, 50, 300, 250);
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
SetTopWindow(frame);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user