#endif
#include "wx/cmdline.h"
+#include "wx/filename.h"
#include "wx/module.h"
#include "wx/msw/private.h"
// the first thing to do is to check if we're trying to run an Unicode
// program under Win9x - if so, abort right now as it has no chance to
// work
-#if wxUSE_UNICODE
+#if wxUSE_UNICODE && !wxUSE_UNICODE_MSLU
if ( wxGetOsVersion() != wxWINDOWS_NT )
{
// note that we can use MessageBoxW() as it's implemented even under
::MessageBox
(
NULL,
- _T("This program uses Unicode and requires Windows NT/2000.\nProgram aborted."),
+ _T("This program uses Unicode and requires Windows NT/2000/XP.\nProgram aborted."),
_T("wxWindows Fatal Error"),
MB_ICONERROR | MB_OK
);
return FALSE;
}
-#endif // wxUSE_UNICODE
+#endif // wxUSE_UNICODE && !wxUSE_UNICODE_MSLU
// Some people may wish to use this, but
// probably it shouldn't be here by default.
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]);