More fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -258,7 +258,6 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS
|
|||||||
m_boundingRect = * rect;
|
m_boundingRect = * rect;
|
||||||
|
|
||||||
bool ret = (ImageList_BeginDrag(GetHimageList(), 0, hotspot.x, hotspot.y) != 0);
|
bool ret = (ImageList_BeginDrag(GetHimageList(), 0, hotspot.x, hotspot.y) != 0);
|
||||||
//bool ret = (ImageList_BeginDrag(GetHimageList(), 0, 0, 0) != 0);
|
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
@@ -284,6 +283,9 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS
|
|||||||
// See if we can find the cursor hotspot
|
// See if we can find the cursor hotspot
|
||||||
wxPoint curHotSpot(hotspot);
|
wxPoint curHotSpot(hotspot);
|
||||||
|
|
||||||
|
// Although it seems to produce the right position, when the hotspot goeos
|
||||||
|
// negative it has strange effects on the image.
|
||||||
|
// How do we stop the cursor jumping right and below of where it should be?
|
||||||
#if 0
|
#if 0
|
||||||
ICONINFO iconInfo;
|
ICONINFO iconInfo;
|
||||||
if (::GetIconInfo((HICON) (HCURSOR) m_cursor.GetHCURSOR(), & iconInfo) != 0)
|
if (::GetIconInfo((HICON) (HCURSOR) m_cursor.GetHCURSOR(), & iconInfo) != 0)
|
||||||
@@ -292,9 +294,9 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS
|
|||||||
curHotSpot.y -= iconInfo.yHotspot;
|
curHotSpot.y -= iconInfo.yHotspot;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
wxString msg;
|
//wxString msg;
|
||||||
msg.Printf("Hotspot = %d, %d", curHotSpot.x, curHotSpot.y);
|
//msg.Printf("Hotspot = %d, %d", curHotSpot.x, curHotSpot.y);
|
||||||
wxLogDebug(msg);
|
//wxLogDebug(msg);
|
||||||
|
|
||||||
// First add the cursor to the image list
|
// First add the cursor to the image list
|
||||||
HCURSOR hCursor = (HCURSOR) m_cursor.GetHCURSOR();
|
HCURSOR hCursor = (HCURSOR) m_cursor.GetHCURSOR();
|
||||||
|
Reference in New Issue
Block a user