wxCmdLineArgType WXUNUSED(pCmdLine),
int nCmdShow)
{
+ // the first thing to do is to check if we're trying to run an Unicode
+ // program under Win9x w/o MSLU emulation layer - if so, abort right now
+ // as it has no chance to work and has all chances to crash
+#if wxUSE_UNICODE && !wxUSE_UNICODE_MSLU && !defined(__WXWINCE__)
+ if ( wxGetOsVersion() != wxWINDOWS_NT )
+ {
+ // note that we can use MessageBoxW() as it's implemented even under
+ // Win9x - OTOH, we can't use wxGetTranslation() because the file APIs
+ // used by wxLocale are not
+ ::MessageBox
+ (
+ NULL,
+ _T("This program uses Unicode and requires Windows NT/2000/XP.\nProgram aborted."),
+ _T("wxWidgets Fatal Error"),
+ MB_ICONERROR | MB_OK
+ );
+
+ return -1;
+ }
+#endif // wxUSE_UNICODE && !wxUSE_UNICODE_MSLU
+
+
// remember the parameters Windows gave us
wxSetInstance(hInstance);
wxApp::m_nCmdShow = nCmdShow;