Improve wxIMPLEMENT_APP() documentation
Explain that this macro defines the application entry point. Also document wxIMPLEMENT_WXWIN_MAIN which wasn't documented at all previously.
This commit is contained in:
@@ -53,12 +53,9 @@ bool DerivedApp::OnInit()
|
||||
}
|
||||
@endcode
|
||||
|
||||
Note the use of wxIMPLEMENT_APP(appClass), which allows wxWidgets to dynamically
|
||||
create an instance of the application object at the appropriate point in
|
||||
wxWidgets initialization. Previous versions of wxWidgets used to rely on the
|
||||
creation of a global application object, but this is no longer recommended,
|
||||
because required global initialization may not have been performed at
|
||||
application object construction time.
|
||||
Note the use of wxIMPLEMENT_APP(), which defines the application entry
|
||||
point (either @c main() or @c WinMain() function, depending on the platform)
|
||||
and tells wxWidgets which application class should be used.
|
||||
|
||||
You can also use wxDECLARE_APP(appClass) in a header file to declare the wxGetApp
|
||||
function which returns a reference to the application object. Otherwise you can
|
||||
|
Reference in New Issue
Block a user