]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/clipbrd.cpp
ActiveX events should be sent to the window, not it's parent.
[wxWidgets.git] / src / msw / clipbrd.cpp
index 842a9c94aa0b5a6ad7808d470e4d7d2432af5404..49cc833ca9d30dcbaf5dcea1f074b46867a96aee 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;
             }