Add wxCursor::GetHotSpot() and implement it for wxMSW and wxGTK.
Allow retrieving the coordinates of the cursor hot spot, at least for the ports for which we know how to do it. Closes #16539. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -275,6 +275,18 @@ wxCursor::wxCursor(const wxString& filename,
|
||||
}
|
||||
}
|
||||
|
||||
wxPoint wxCursor::GetHotSpot() const
|
||||
{
|
||||
if ( !GetGDIImageData() )
|
||||
return wxDefaultPosition;
|
||||
|
||||
AutoIconInfo ii;
|
||||
if ( !ii.GetFrom((HICON)GetGDIImageData()->m_hCursor) )
|
||||
return wxDefaultPosition;
|
||||
|
||||
return wxPoint(ii.xHotspot, ii.yHotspot);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user