Fixed bug [ 413614 ] native wxDragImage w/o mask is broken
by adding ILC_MASK even when there's no mask. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,6 +28,14 @@ override \helpref{wxDragImage::DoDrawImage}{wxdragimagedodrawimage} and
|
||||
|
||||
Please see {\tt samples/dragimag} for an example.
|
||||
|
||||
%\wxheading{Notes}
|
||||
%
|
||||
%Using the native Windows implementation, you must supply an image with a mask, or
|
||||
%the image will not show when dragged. It is not clear if this is a bug
|
||||
%in Windows or in the wxDragImage implementation. You can add a mask
|
||||
%with a call to wxImage::SetMaskColour, passing RGB values not likely
|
||||
%to be in the image. [CURED by creating the ImageList with ILC_MASK]
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
@@ -129,7 +129,11 @@ bool wxDragImage::Create(const wxBitmap& image, const wxCursor& cursor)
|
||||
flags = ILC_COLOR32;
|
||||
|
||||
bool mask = (image.GetMask() != 0);
|
||||
if ( mask )
|
||||
|
||||
// Curiously, even if the image doesn't have a mask,
|
||||
// we still have to use ILC_MASK or the image won't show
|
||||
// up when dragged.
|
||||
// if ( mask )
|
||||
flags |= ILC_MASK;
|
||||
|
||||
m_hImageList = (WXHIMAGELIST) ImageList_Create(image.GetWidth(), image.GetHeight(), flags, 1, 1);
|
||||
|
Reference in New Issue
Block a user