Fix wxEVT_TREE_STATE_IMAGE_CLICK generation in wxMSW wxTreeCtrl.
Use GET_{X,Y}_LPARAM() to extract them from the event position, which handle negative coordinates (and coordinates can perfectly well be negative when using multiple displays) correctly, unlike {LO,HI}WORD(). Closes #16812. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3612,8 +3612,8 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
{
|
||||
DWORD pos = GetMessagePos();
|
||||
POINT point;
|
||||
point.x = LOWORD(pos);
|
||||
point.y = HIWORD(pos);
|
||||
point.x = GET_X_LPARAM(pos);
|
||||
point.y = GET_Y_LPARAM(pos);
|
||||
::MapWindowPoints(HWND_DESKTOP, GetHwnd(), &point, 1);
|
||||
int htFlags = 0;
|
||||
wxTreeItemId item = HitTest(wxPoint(point.x, point.y), htFlags);
|
||||
|
Reference in New Issue
Block a user