]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/init.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of global functions
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
13 Create an object of this class on the stack to initialize/cleanup the library
17 @category{appmanagement}
25 Initializes the library.
28 wxInitializer(int argc
= 0, wxChar
**argv
= NULL
);
31 Has the initialization been successful? (explicit test)
36 This dtor only does clean up if we initialized the library properly.
37 Calls wxUninitialize().
44 /** @addtogroup group_funcmacro_appinitterm */
48 This function can be used to perform the initialization of wxWidgets if you
49 can't use the default initialization code for any reason.
51 If the function returns true, the initialization was successful and the
52 global wxApp object ::wxTheApp has been created. Moreover, wxEntryCleanup()
53 must be called afterwards. If the function returns false, a catastrophic
54 initialization error occurred and (at least the GUI part of) the library
57 Notice that parameters @c argc and @c argv may be modified by this
62 bool wxEntryStart(int& argc
, wxChar
** argv
);
65 See wxEntryStart(int&,wxChar**) for more info about this function.
67 This is an additional overload of wxEntryStart() provided under MSW only.
68 It is meant to be called with the parameters passed to WinMain().
70 @note Under Windows CE platform, and only there, the type of @a pCmdLine is
71 @c wchar_t *, otherwise it is @c char *, even in Unicode build.
77 bool wxEntryStart(HINSTANCE hInstance
,
78 HINSTANCE hPrevInstance
= NULL
,
79 char* pCmdLine
= NULL
,
80 int nCmdShow
= SW_SHOWNORMAL
);
83 Free resources allocated by a successful call to wxEntryStart().
87 void wxEntryCleanup();
90 Initialize the library (may be called as many times as needed, but each
91 call to wxInitialize() must be matched by wxUninitialize()).
93 With this function you may avoid wxDECLARE_APP() and wxIMPLEMENT_APP() macros
94 and use wxInitialize() and wxUninitialize() dynamically in the
95 program startup and termination.
99 bool wxInitialize(int argc
= 0, wxChar
**argv
= NULL
);
102 Clean up; the library can't be used any more after the last call to
105 See wxInitialize() for more info.
109 void wxUninitialize();