More WinCE mods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-07-11 23:04:34 +00:00
parent 52cd14b1c8
commit f07dc2e2a7
6 changed files with 27 additions and 10 deletions

View File

@@ -270,7 +270,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
// program under Win9x w/o MSLU emulation layer - if so, abort right now
// as it has no chance to work
#if wxUSE_UNICODE && !wxUSE_UNICODE_MSLU
if ( wxGetOsVersion() != wxWINDOWS_NT )
if ( wxGetOsVersion() != wxWINDOWS_NT && wxGetOsVersion() != wxWINDOWS_CE )
{
// note that we can use MessageBoxW() as it's implemented even under
// Win9x - OTOH, we can't use wxGetTranslation() because the file APIs
@@ -278,7 +278,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
::MessageBox
(
NULL,
_T("This program uses Unicode and requires Windows NT/2000/XP.\nProgram aborted."),
_T("This program uses Unicode and requires Windows NT/2000/XP/CE.\nProgram aborted."),
_T("wxWindows Fatal Error"),
MB_ICONERROR | MB_OK
);
@@ -302,9 +302,14 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
#if wxUSE_OLE
// we need to initialize OLE library
#ifdef __WXWINCE__
if ( FAILED(::CoInitializeEx(NULL, COINIT_MULTITHREADED)) )
wxLogError(_("Cannot initialize OLE"));
#else
if ( FAILED(::OleInitialize(NULL)) )
wxLogError(_("Cannot initialize OLE"));
#endif
#endif
#endif // wxUSE_OLE
@@ -510,7 +515,11 @@ void wxApp::CleanUp()
::DeleteObject( wxDisableButtonBrush );
#if wxUSE_OLE
#ifdef __WXWINCE__
::CoUninitialize();
#else
::OleUninitialize();
#endif
#endif
// for an EXE the classes are unregistered when it terminates but DLL may