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:
Vadim Zeitlin
2015-01-27 11:51:27 +00:00
parent ad72c3429f
commit 041f9a4cf2

View File

@@ -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);