don't even try running Unicode programs under Win9x

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-04-26 14:17:07 +00:00
parent f8cc27023e
commit c513dcd1dd

View File

@@ -187,6 +187,27 @@ LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM);
//// Initialize
bool wxApp::Initialize()
{
// 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 ( 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.\nProgram aborted."),
_T("wxWindows Fatal Error"),
MB_ICONERROR | MB_OK
);
return FALSE;
}
#endif // wxUSE_UNICODE
// Some people may wish to use this, but
// probably it shouldn't be here by default.
#ifdef __WXDEBUG__