X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/605ff820f51795f0f43c473a85b3c7f5f985ed30..ad653fa23069c5d9378247084f03c9a718c3ad62:/src/msw/main.cpp diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 552a864550..06cc6a4771 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -202,7 +202,7 @@ int wxEntry(int& argc, wxChar **argv) #endif // wxUSE_BASE -#if wxUSE_GUI && defined(__WXMSW__) +#if wxUSE_GUI namespace { @@ -316,7 +316,7 @@ struct wxMSWCommandLineArguments argv = new wxChar *[argc + 1]; for ( int i = 0; i < argc; i++ ) { - argv[i] = wxStrdup(args[i].wx_str()); + argv[i] = wxStrdup(args[i].t_str()); } // argv[] must be NULL-terminated @@ -333,8 +333,7 @@ struct wxMSWCommandLineArguments free(argv[i]); } - delete [] argv; - argv = NULL; + wxDELETEA(argv); argc = 0; } @@ -359,7 +358,9 @@ wxMSWEntryCommon(HINSTANCE hInstance, int nCmdShow) // remember the parameters Windows gave us wxSetInstance(hInstance); +#ifdef __WXMSW__ wxApp::m_nCmdShow = nCmdShow; +#endif // parse the command line: we can't use pCmdLine in Unicode build so it is // simpler to never use it at all (this also results in a more correct @@ -415,7 +416,7 @@ WXDLLEXPORT int wxEntry(HINSTANCE hInstance, return wxEntry(wxArgs.argc, wxArgs.argv); } -#endif // wxUSE_GUI && __WXMSW__ +#endif // wxUSE_GUI // ---------------------------------------------------------------------------- // global HINSTANCE