switch ( format ) {
case CF_TEXT: return wxT("CF_TEXT");
case CF_BITMAP: return wxT("CF_BITMAP");
- case CF_METAFILEPICT: return wxT("CF_METAFILEPICT");
case CF_SYLK: return wxT("CF_SYLK");
case CF_DIF: return wxT("CF_DIF");
case CF_TIFF: return wxT("CF_TIFF");
case CF_RIFF: return wxT("CF_RIFF");
case CF_WAVE: return wxT("CF_WAVE");
case CF_UNICODETEXT: return wxT("CF_UNICODETEXT");
+#ifndef __WXWINCE__
+ case CF_METAFILEPICT: return wxT("CF_METAFILEPICT");
case CF_ENHMETAFILE: return wxT("CF_ENHMETAFILE");
- case CF_HDROP: return wxT("CF_HDROP");
case CF_LOCALE: return wxT("CF_LOCALE");
+ case CF_HDROP: return wxT("CF_HDROP");
+#endif
default:
if ( !::GetClipboardFormatName(format, s_szBuf, WXSIZEOF(s_szBuf)) )
// wxBitmapDataObject supports CF_DIB format
// ----------------------------------------------------------------------------
+// TODO: support CF_DIB under Windows CE as well
+
size_t wxBitmapDataObject::GetDataSize() const
{
-#if wxUSE_WXDIB
+#if wxUSE_WXDIB && !defined(__WXWINCE__)
return wxDIB::ConvertFromBitmap(NULL, GetHbitmapOf(GetBitmap()));
#else
return 0;
bool wxBitmapDataObject::GetDataHere(void *buf) const
{
-#if wxUSE_WXDIB
+#if wxUSE_WXDIB && !defined(__WXWINCE__)
BITMAPINFO * const pbi = (BITMAPINFO *)buf;
return wxDIB::ConvertFromBitmap(pbi, GetHbitmapOf(GetBitmap())) != 0;
bool wxBitmapDataObject::SetData(size_t WXUNUSED(len), const void *buf)
{
-#if wxUSE_WXDIB
+#if wxUSE_WXDIB && !defined(__WXWINCE__)
const BITMAPINFO * const pbmi = (const BITMAPINFO *)buf;
HBITMAP hbmp = wxDIB::ConvertToBitmap(pbmi);
return 0;
// inital size of DROPFILES struct + null byte
- size_t sz = sizeof(DROPFILES) + 1;
+ size_t sz = sizeof(DROPFILES) + (1 * sizeof(wxChar));
size_t count = m_filenames.GetCount();
for ( size_t i = 0; i < count; i++ )
{
// add filename length plus null byte
- sz += m_filenames[i].Len() + 1;
+ sz += (m_filenames[i].Len() + 1) * sizeof(wxChar);
}
return sz;
{
// copy filename to pbuf and add null terminator
size_t len = m_filenames[i].Len();
- memcpy(pbuf, m_filenames[i], len);
+ memcpy(pbuf, m_filenames[i], len*sizeof(wxChar));
pbuf += len;
*pbuf++ = wxT('\0');
}