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
#define wxUSE_DIB_FOR_BITMAP 0
// Set this to 1 to enable wxDIB
-#define wxUSE_WXDIB 1
+#define wxUSE_WXDIB 0
// ----------------------------------------------------------------------------
// common dialogs
// 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
::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
);
#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
::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
HBITMAP hbmp;
+#if wxUSE_WXDIB
if ( wxShouldCreateDIB(w, h, d, hdc) )
{
if ( d == -1 )
GetBitmapData()->m_depth = d;
}
else // create a DDB
+#endif
{
if ( d == -1 )
d = wxDisplayDepth();
bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc )
{
+#if wxUSE_WXDIB
wxCHECK_MSG( image.Ok(), FALSE, wxT("invalid image") );
UnRef();
}
return TRUE;
+#else
+ // FIXME: wxWinCE doesn't support wxDIB yet
+ return FALSE;
+#endif
}
wxImage wxBitmap::ConvertToImage() const
#include "wx/dataobj.h"
#endif
-#if wxUSE_OLE
+#if wxUSE_OLE && !defined(__WXWINCE__)
// use OLE clipboard
#define wxUSE_OLE_CLIPBOARD 1
#else // !wxUSE_DATAOBJ
#include <ole2.h>
#endif // wxUSE_OLE_CLIPBOARD
-#ifdef __WIN16__
- #define memcpy hmemcpy
-#endif
-
// ===========================================================================
// implementation
// ===========================================================================
// This didn't compile, of course
// return wxSetClipboardData(data);
// TODO
- wxLogError("Not implemented.");
+ wxLogError(wxT("Not implemented."));
return FALSE;
}
}
if ( !s )
return FALSE;
- textDataObject.SetText(s);
+ textDataObject.SetText(wxString::FromAscii(s));
delete [] s;
return TRUE;
case VER_PLATFORM_WIN32_NT:
s_ver = wxWINDOWS_NT;
break;
+
+ case VER_PLATFORM_WIN32_CE:
+ s_ver = wxWINDOWS_CE;
+ break;
}
}
}