wxWidgets: /home/Hamis/wxwidgets/wxWidgets3.0/wxWidgets3.0-3.0.5.1-2.x86_64/src/wxWidgets-3.0.5.1/interface/wx/init.h File Reference

| Version: 3.0.5

Classes | Functions
init.h File Reference

## Classes
class | wxInitializer
| Create an object of this class on the stack to initialize/cleanup the library automatically. More...

## Functions
bool | wxEntryStart (int &argc, wxChar **argv)
| This function can be used to perform the initialization of wxWidgets if you can't use the default initialization code for any reason. More...
bool | wxEntryStart (HINSTANCE hInstance, HINSTANCE hPrevInstance=NULL, char *pCmdLine=NULL, int nCmdShow=SW_SHOWNORMAL)
| See wxEntryStart(int&,wxChar**) for more info about this function. More...
void | wxEntryCleanup ()
| Free resources allocated by a successful call to wxEntryStart(). More...
bool | wxInitialize (int argc=0, wxChar **argv=NULL)
| Initialize the library (may be called as many times as needed, but each call to wxInitialize() must be matched by wxUninitialize()). More...
void | wxUninitialize ()
| Clean up; the library can't be used any more after the last call to wxUninitialize(). More...
void | wxMSWDisableSettingHighDPIAware ()
| Prevents wxWidgets from setting HighDPI awareness mode. More...

## Function Documentation

## ◆ wxEntryCleanup()

void wxEntryCleanup | ( |  | ) |

Free resources allocated by a successful call to wxEntryStart().

Include file:

    #include <wx/init.h>

## ◆ wxEntryStart() [1/2]

bool wxEntryStart | ( | HINSTANCE | hInstance,
|  | HINSTANCE | hPrevInstance = `NULL`,
|  | char * | pCmdLine = `NULL`,
|  | int | nCmdShow = `SW_SHOWNORMAL`
| ) |  |

See wxEntryStart(int&,wxChar**) for more info about this function.

This is an additional overload of wxEntryStart() provided under MSW only. It is meant to be called with the parameters passed to WinMain().

Note
  Under Windows CE platform, and only there, the type of pCmdLine is `wchar_t` *, otherwise it is `char` *, even in Unicode build.

Availability: only available for the wxMSW port.

Include file:

    #include <wx/init.h>

## ◆ wxEntryStart() [2/2]

bool wxEntryStart | ( | int & | argc,
|  | wxChar ** | argv
| ) |  |

This function can be used to perform the initialization of wxWidgets if you can't use the default initialization code for any reason.

If the function returns true, the initialization was successful and the global wxApp object wxTheApp has been created. Moreover, wxEntryCleanup() must be called afterwards. If the function returns false, a catastrophic initialization error occurred and (at least the GUI part of) the library can't be used at all.

Notice that parameters `argc` and `argv` may be modified by this function.

Include file:

    #include <wx/init.h>

## ◆ wxInitialize()

bool wxInitialize | ( | int | argc = `0`,
|  | wxChar ** | argv = `NULL`
| ) |  |

Initialize the library (may be called as many times as needed, but each call to wxInitialize() must be matched by wxUninitialize()).

With this function you may avoid wxDECLARE_APP() and wxIMPLEMENT_APP() macros and use wxInitialize() and wxUninitialize() dynamically in the program startup and termination.

Include file:

    #include <wx/init.h>

## ◆ wxMSWDisableSettingHighDPIAware()

void wxMSWDisableSettingHighDPIAware | ( |  | ) |

Prevents wxWidgets from setting HighDPI awareness mode.

wxEntry calls SetDPIProcessAware() early during initialization on Windows. To prevent this (e.g. because wx is embedded in native code and disabling DPI awareness in the manifest is not an option), call this function before* wxEntry() is called.

Availability: only available for the wxMSW port.

Include file:

    #include <wx/init.h>

Since
  3.0.3, but only available in 3.0.x, not 3.1+ which doesn't make the SetDPIProcessAware() call anymore.

## ◆ wxUninitialize()

void wxUninitialize | ( |  | ) |

Clean up; the library can't be used any more after the last call to wxUninitialize().

See wxInitialize() for more info.

Include file:

    #include <wx/init.h>