]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxDIB object instead of static ConvertFromBitmap() in CF_DIB case
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 4 Apr 2004 12:58:26 +0000 (12:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 4 Apr 2004 12:58:26 +0000 (12:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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;
             }