From c2517b523979d4beaabbbe3538df1b49d682748d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 4 Apr 2004 12:58:26 +0000 Subject: [PATCH] use wxDIB object instead of static ConvertFromBitmap() in CF_DIB case git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/clipbrd.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 842a9c94aa..49cc833ca9 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -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; } -- 2.45.2