diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-19 12:50:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-19 12:50:25 +0000 |
commit | 24a39515399e9555dd0e4ad72b7a22f9152b0adf (patch) | |
tree | 3577b4bf1442497133aa1646bdb3443950ed0cef /plugins/HTTPServer/src | |
parent | 400d7bb71630f774dc9392cad37a22528958e2bc (diff) |
end of zoo with WM_CONTEXTMENU's lParam
git-svn-id: http://svn.miranda-ng.org/main/trunk@13693 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer/src')
-rw-r--r-- | plugins/HTTPServer/src/Glob.h | 1 | ||||
-rw-r--r-- | plugins/HTTPServer/src/GuiElements.cpp | 32 |
2 files changed, 12 insertions, 21 deletions
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 <windows.h>
+#include <windowsx.h>
#include <commctrl.h>
#include <time.h>
#include <string>
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);
}
|