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/HTTPServer/src/Glob.h | 1 + plugins/HTTPServer/src/GuiElements.cpp | 32 +++++++++++--------------------- 2 files changed, 12 insertions(+), 21 deletions(-) (limited to 'plugins/HTTPServer/src') diff --git a/plugins/HTTPServer/src/Glob.h b/plugins/HTTPServer/src/Glob.h index f64d28d950..2b5fe8e8c3 100644 --- a/plugins/HTTPServer/src/Glob.h +++ b/plugins/HTTPServer/src/Glob.h @@ -21,6 +21,7 @@ #define _CRT_SECURE_NO_DEPRECATE #include +#include #include #include #include diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 6d092f2251..593b5aa0fd 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -817,9 +817,7 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara if (hMainMenu) { HMENU hMenu = GetSubMenu(hMainMenu, 0); - POINT pt; - 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) { HWND hMapUser = GetDlgItem(hwndDlg, IDC_CURRENT_SHARES); int nFirst = ListView_GetNextItem(hMapUser, -1, LVNI_FOCUSED); @@ -1393,27 +1391,19 @@ void CALLBACK OpenStatisticViewFromPopupProc(ULONG_PTR /* dwParam */) { nShowStatisticsView(0, 0); } -LRESULT CALLBACK PopupWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { +LRESULT CALLBACK PopupWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ PUGetPluginData(hWnd); - //HANDLE hData = (HANDLE)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, (LPARAM)&hData); - - switch (message) { - //case WM_LBUTTONUP: - //case WM_LBUTTONDBLCLK: // These don't work I can't undestande why !! - case WM_LBUTTONDOWN: - //nShowStatisticsView(0,0); - // has to be called from the right thread - //QueueUserAPC(OpenStatisticViewFromPopupProc, hMainThread, 0); - - QueueUserAPC(OpenStatisticViewFromPopupProc, hMainThread, 0); - PUDeletePopup( hWnd ); - return 0; + switch (message) { + case WM_LBUTTONDOWN: + QueueUserAPC(OpenStatisticViewFromPopupProc, hMainThread, 0); + PUDeletePopup( hWnd ); + return 0; - case WM_CONTEXTMENU: { - PUDeletePopup( hWnd ); - return 0; - } + case WM_CONTEXTMENU: + PUDeletePopup( hWnd ); + return 0; } return DefWindowProc(hWnd, message, wParam, lParam); } -- cgit v1.2.3