From 24a39515399e9555dd0e4ad72b7a22f9152b0adf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 May 2015 12:50:25 +0000 Subject: end of zoo with WM_CONTEXTMENU's lParam git-svn-id: http://svn.miranda-ng.org/main/trunk@13693 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/Include/commonheaders.h | 1 + plugins/Clist_nicer/src/clc.cpp | 5 ++--- plugins/Clist_nicer/src/clui.cpp | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/Clist_nicer/src') diff --git a/plugins/Clist_nicer/src/Include/commonheaders.h b/plugins/Clist_nicer/src/Include/commonheaders.h index dfa289636b..a3b7759d7a 100644 --- a/plugins/Clist_nicer/src/Include/commonheaders.h +++ b/plugins/Clist_nicer/src/Include/commonheaders.h @@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define FASTCALL __fastcall #include +#include #include #include diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 051a803f9b..3900e1770b 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -659,7 +659,6 @@ LBL_Def: case WM_CONTEXTMENU: { HMENU hMenu = NULL; - POINT pt; DWORD hitFlags; pcli->pfnEndRename(hwnd, dat, 1); @@ -670,8 +669,8 @@ LBL_Def: SetFocus(hwnd); dat->iHotTrack = -1; dat->szQuickSearch[0] = 0; - pt.x = (short) LOWORD(lParam); - pt.y = (short) HIWORD(lParam); + + POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; if (pt.x == -1 && pt.y == -1) { dat->selection = pcli->pfnGetRowByIndex(dat, dat->selection, &contact, NULL); if (dat->selection != -1) diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index ea83885538..dab1bcb663 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1613,12 +1613,10 @@ buttons_done: case WM_CONTEXTMENU: { RECT rc; - POINT pt; + GetWindowRect(pcli->hwndContactTree, &rc); - pt.x = (short)LOWORD(lParam); - pt.y = (short)HIWORD(lParam); // x/y might be -1 if it was generated by a kb click - GetWindowRect(pcli->hwndContactTree, &rc); + POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; if (pt.x == -1 && pt.y == -1) { // all this is done in screen-coords! GetCursorPos(&pt); -- cgit v1.2.3