]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/clipbrd.cpp
fixed wxGetKeyState to get current status of non-togle keys, and to
[wxWidgets.git] / src / msw / clipbrd.cpp
index 1ee4cd14ce9e6037adef38bf63da60eb4f682cc5..49cc833ca9d30dcbaf5dcea1f074b46867a96aee 100644 (file)
@@ -146,7 +146,7 @@ bool wxIsClipboardOpened()
 
 bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
 {
-    CLIPFORMAT cf = dataFormat.GetFormatId();
+   wxDataFormat::NativeFormat cf = dataFormat.GetFormatId();
 
     if ( ::IsClipboardFormatAvailable(cf) )
     {
@@ -161,7 +161,7 @@ bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
         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
@@ -221,10 +221,13 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
             {
                 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;
             }
@@ -252,7 +255,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
             }
 #endif // wxUSE_METAFILE
 
-#if wxUSE_ENH_METAFILE && !defined(__WIN16__) && !defined(__WXWINCE__)
+#if wxUSE_ENH_METAFILE && !defined(__WXWINCE__)
         case wxDF_ENHMETAFILE:
             {
                 wxEnhMetaFile *emf = (wxEnhMetaFile *)data;