- wxStringList args;
-
- wxString cmdLine(lpCmdLine);
- int count = 0;
-
- // Get application name
- wxChar name[260]; // 260 is MAX_PATH value from windef.h
- ::GetModuleFileName(wxhInstance, name, WXSIZEOF(name));
-
- args.Add(name);
- count++;
-
- wxStrcpy(name, wxFileNameFromPath(name));
- wxStripExtension(name);
- wxTheApp->SetAppName(name);
+ // break the command line in words
+ wxArrayString args =
+ wxCmdLineParser::ConvertStringToArgs(wxConvertMB2WX(lpCmdLine));