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/Scriver/src/chat/window.cpp | 12 ++++++------ plugins/Scriver/src/commonheaders.h | 1 + plugins/Scriver/src/input.cpp | 4 ++-- plugins/Scriver/src/msgdialog.cpp | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 9c0d2e7c6a..a66f2b3398 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -681,8 +681,8 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR ClientToScreen(hwnd, &pt); } else { - pt.x = (short)LOWORD(lParam); - pt.y = (short)HIWORD(lParam); + pt.x = GET_X_LPARAM(lParam); + pt.y = GET_Y_LPARAM(lParam); } ptl.x = (LONG)pt.x; ptl.y = (LONG)pt.y; @@ -873,8 +873,8 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, int height = 0; TVHITTESTINFO hti; - hti.pt.x = (short)LOWORD(lParam); - hti.pt.y = (short)HIWORD(lParam); + hti.pt.x = GET_X_LPARAM(lParam); + hti.pt.y = GET_Y_LPARAM(lParam); if (hti.pt.x == -1 && hti.pt.y == -1) { int index = SendMessage(hwnd, LB_GETCURSEL, 0, 0); int top = SendMessage(hwnd, LB_GETTOPINDEX, 0, 0); @@ -1560,8 +1560,8 @@ LABEL_SHOWWINDOW: break; case GC_SHOWCOLORCHOOSER: - pci->ColorChooser(si, lParam == IDC_CHAT_COLOR, hwndDlg, GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), GetDlgItem(hwndDlg, lParam)); - break; + pci->ColorChooser(si, lParam == IDC_CHAT_COLOR, hwndDlg, GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), GetDlgItem(hwndDlg, lParam)); + break; case GC_SCROLLTOBOTTOM: if ((GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHAT_LOG), GWL_STYLE) & WS_VSCROLL) != 0) { diff --git a/plugins/Scriver/src/commonheaders.h b/plugins/Scriver/src/commonheaders.h index 159a5b9f45..bd5432906c 100644 --- a/plugins/Scriver/src/commonheaders.h +++ b/plugins/Scriver/src/commonheaders.h @@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define COMPILE_MULTIMON_STUBS #include +#include #include #include #include diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index 2d9ffc91bc..81c3b5c8d7 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -59,8 +59,8 @@ void InputAreaContextMenu(HWND hwnd, WPARAM, LPARAM lParam, MCONTACT hContact) ClientToScreen(hwnd, &pt); } else { - pt.x = (short)LOWORD(lParam); - pt.y = (short)HIWORD(lParam); + pt.x = GET_X_LPARAM(lParam); + pt.y = GET_Y_LPARAM(lParam); } // First notification diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index d63998067b..acb56dad6c 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -318,8 +318,8 @@ static LRESULT CALLBACK LogEditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, ClientToScreen(hwnd, &pt); } else { - pt.x = (short)LOWORD(lParam); - pt.y = (short)HIWORD(lParam); + pt.x = GET_X_LPARAM(lParam); + pt.y = GET_Y_LPARAM(lParam); } POINTL ptl = { (LONG)pt.x, (LONG)pt.y }; -- cgit v1.2.3