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
This commit is contained in:
@@ -221,10 +221,13 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
|
|||||||
{
|
{
|
||||||
wxBitmap *bitmap = (wxBitmap *)data;
|
wxBitmap *bitmap = (wxBitmap *)data;
|
||||||
|
|
||||||
HGLOBAL hDIB = wxDIB::ConvertFromBitmap(GetHbitmapOf(*bitmap));
|
if ( bitmap && bitmap->Ok() )
|
||||||
if ( hDIB )
|
|
||||||
{
|
{
|
||||||
handle = ::SetClipboardData(CF_DIB, hDIB);
|
wxDIB dib(*bitmap);
|
||||||
|
if ( dib.IsOk() )
|
||||||
|
{
|
||||||
|
handle = ::SetClipboardData(CF_DIB, dib.Detach());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user