-// May wish not to have a DllMain or WinMain, e.g. if we're programming
-// a Netscape plugin or if we're writing a console application
-#if wxUSE_GUI && !defined(NOMAIN)
+WXDLLEXPORT int wxEntry(HINSTANCE hInstance,
+ HINSTANCE WXUNUSED(hPrevInstance),
+ char * WXUNUSED(pCmdLine),
+ int nCmdShow)
+{
+ // remember the parameters Windows gave us
+ wxSetInstance(hInstance);
+ wxApp::m_nCmdShow = nCmdShow;
+
+ // 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
+ // argv[0])
+
+ // break the command line in words
+ wxArrayString args;
+ const wxChar *cmdLine = ::GetCommandLine();
+ if ( cmdLine )
+ {
+ args = wxCmdLineParser::ConvertStringToArgs(cmdLine);
+ }