bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
{
- CLIPFORMAT cf = dataFormat.GetFormatId();
+ wxDataFormat::NativeFormat cf = dataFormat.GetFormatId();
if ( ::IsClipboardFormatAvailable(cf) )
{
case CF_BITMAP:
return ::IsClipboardFormatAvailable(CF_DIB) != 0;
-#if wxUSE_ENH_METAFILE && !defined(__WIN16__) && !defined(__WXWINCE__)
+#if wxUSE_ENH_METAFILE && !defined(__WXWINCE__)
case CF_METAFILEPICT:
return ::IsClipboardFormatAvailable(CF_ENHMETAFILE) != 0;
#endif // wxUSE_ENH_METAFILE
{
wxBitmap *bitmap = (wxBitmap *)data;
- HGLOBAL hDIB = wxDIB::ConvertFromBitmap(GetHbitmapOf(*bitmap));
- if ( hDIB )
+ if ( bitmap && bitmap->Ok() )
{
- handle = ::SetClipboardData(CF_DIB, hDIB);
+ wxDIB dib(*bitmap);
+ if ( dib.IsOk() )
+ {
+ handle = ::SetClipboardData(CF_DIB, dib.Detach());
+ }
}
break;
}
}
#endif // wxUSE_METAFILE
-#if wxUSE_ENH_METAFILE && !defined(__WIN16__) && !defined(__WXWINCE__)
+#if wxUSE_ENH_METAFILE && !defined(__WXWINCE__)
case wxDF_ENHMETAFILE:
{
wxEnhMetaFile *emf = (wxEnhMetaFile *)data;
{
#if 1
// TODO
- wxLogError("Not implemented because wxMetafileDataObject does not contain width and height values.");
+ wxLogError(wxT("Not implemented because wxMetafileDataObject does not contain width and height values."));
return FALSE;
#else
wxMetafileDataObject* metaFileDataObject =