]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/clipbrd.cpp
Fix by George Wismer to get flat toolbars under Windows Classic style,
[wxWidgets.git] / src / msw / clipbrd.cpp
index 842a9c94aa0b5a6ad7808d470e4d7d2432af5404..9d351247651e1670efba85920b0a4d784b455383 100644 (file)
@@ -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;
             }
@@ -662,7 +665,7 @@ bool wxClipboard::AddData( wxDataObject *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 =
@@ -698,7 +701,7 @@ void wxClipboard::Close()
 #endif
 }
 
-bool wxClipboard::IsSupported( wxDataFormat format )
+bool wxClipboard::IsSupported( const wxDataFormat& format )
 {
     return wxIsClipboardFormatAvailable(format);
 }