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:
@@ -566,6 +566,7 @@ enum
|
||||
wxWIN32S, // Windows 32S API
|
||||
wxWIN95, // Windows 95
|
||||
wxWIN386, // Watcom 32-bit supervisor modus
|
||||
wxWINDOWS_CE, // Windows CE
|
||||
wxMGL_UNIX, // MGL with direct hardware access
|
||||
wxMGL_X, // MGL on X
|
||||
wxMGL_WIN32, // MGL on Win32
|
||||
|
@@ -643,7 +643,7 @@
|
||||
#define wxUSE_DIB_FOR_BITMAP 0
|
||||
|
||||
// Set this to 1 to enable wxDIB
|
||||
#define wxUSE_WXDIB 1
|
||||
#define wxUSE_WXDIB 0
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// common dialogs
|
||||
|
@@ -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
|
||||
|
@@ -506,6 +506,7 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc)
|
||||
|
||||
HBITMAP hbmp;
|
||||
|
||||
#if wxUSE_WXDIB
|
||||
if ( wxShouldCreateDIB(w, h, d, hdc) )
|
||||
{
|
||||
if ( d == -1 )
|
||||
@@ -525,6 +526,7 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc)
|
||||
GetBitmapData()->m_depth = d;
|
||||
}
|
||||
else // create a DDB
|
||||
#endif
|
||||
{
|
||||
if ( d == -1 )
|
||||
d = wxDisplayDepth();
|
||||
@@ -776,6 +778,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, const wxDC& dc)
|
||||
|
||||
bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc )
|
||||
{
|
||||
#if wxUSE_WXDIB
|
||||
wxCHECK_MSG( image.Ok(), FALSE, wxT("invalid image") );
|
||||
|
||||
UnRef();
|
||||
@@ -835,6 +838,10 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc )
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
#else
|
||||
// FIXME: wxWinCE doesn't support wxDIB yet
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
wxImage wxBitmap::ConvertToImage() const
|
||||
|
@@ -68,7 +68,7 @@
|
||||
#include "wx/dataobj.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_OLE
|
||||
#if wxUSE_OLE && !defined(__WXWINCE__)
|
||||
// use OLE clipboard
|
||||
#define wxUSE_OLE_CLIPBOARD 1
|
||||
#else // !wxUSE_DATAOBJ
|
||||
@@ -80,10 +80,6 @@
|
||||
#include <ole2.h>
|
||||
#endif // wxUSE_OLE_CLIPBOARD
|
||||
|
||||
#ifdef __WIN16__
|
||||
#define memcpy hmemcpy
|
||||
#endif
|
||||
|
||||
// ===========================================================================
|
||||
// implementation
|
||||
// ===========================================================================
|
||||
@@ -686,7 +682,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
||||
// This didn't compile, of course
|
||||
// return wxSetClipboardData(data);
|
||||
// TODO
|
||||
wxLogError("Not implemented.");
|
||||
wxLogError(wxT("Not implemented."));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -878,7 +874,7 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
if ( !s )
|
||||
return FALSE;
|
||||
|
||||
textDataObject.SetText(s);
|
||||
textDataObject.SetText(wxString::FromAscii(s));
|
||||
delete [] s;
|
||||
|
||||
return TRUE;
|
||||
|
@@ -1028,6 +1028,10 @@ int wxAppTraits::GetOSVersion(int *verMaj, int *verMin)
|
||||
case VER_PLATFORM_WIN32_NT:
|
||||
s_ver = wxWINDOWS_NT;
|
||||
break;
|
||||
|
||||
case VER_PLATFORM_WIN32_CE:
|
||||
s_ver = wxWINDOWS_CE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user