+
+ if ( !UnregisterClass(wxCanvasClassNameNR, wxhInstance) )
+ {
+ wxLogLastError(wxT("UnregisterClass(no redraw canvas)"));
+
+ retval = FALSE;
+ }
+#endif
+ // __WXMICROWIN__
+ return retval;
+}
+
+// ---------------------------------------------------------------------------
+// Convert Windows to argc, argv style
+// ---------------------------------------------------------------------------
+
+void wxApp::ConvertToStandardCommandArgs(const char* lpCmdLine)
+{
+ // break the command line in words
+ wxArrayString args =
+ wxCmdLineParser::ConvertStringToArgs(wxConvertMB2WX(lpCmdLine));
+
+ // +1 here for the program name
+ argc = args.GetCount() + 1;
+
+ // and +1 here for the terminating NULL
+ argv = new wxChar *[argc + 1];
+
+ argv[0] = new wxChar[260]; // 260 is MAX_PATH value from windef.h
+ ::GetModuleFileName(wxhInstance, argv[0], 260);
+
+ // also set the app name from argv[0]
+ wxString name;
+ wxFileName::SplitPath(argv[0], NULL, &name, NULL);
+
+ SetAppName(name);
+
+ // copy all the other arguments to wxApp::argv[]
+ for ( int i = 1; i < argc; i++ )
+ {
+ argv[i] = copystring(args[i - 1]);
+ }
+
+ // argv[] must be NULL-terminated
+ argv[argc] = NULL;