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/AvatarHistory/src/popup.cpp | |
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/AvatarHistory/src/popup.cpp')
-rw-r--r-- | plugins/AvatarHistory/src/popup.cpp | 78 |
1 files changed, 32 insertions, 46 deletions
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp index 07810669c9..a43da24ef1 100644 --- a/plugins/AvatarHistory/src/popup.cpp +++ b/plugins/AvatarHistory/src/popup.cpp @@ -203,39 +203,32 @@ LRESULT CALLBACK PopupWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam // Handle to popup events
static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
+ PopupDataType *popup = (PopupDataType*)PUGetPluginData(hWnd);
+
switch(message) {
- case WM_COMMAND:
- {
- PopupDataType* popup = (PopupDataType*)PUGetPluginData(hWnd);
- PostMessage(hPopupWindow, WMU_ACTION, (WPARAM)popup->plugin_data, opts.popup_left_click_action);
+ case WM_COMMAND:
+ PostMessage(hPopupWindow, WMU_ACTION, (WPARAM)popup->plugin_data, opts.popup_left_click_action);
- if (opts.popup_left_click_action != POPUP_ACTION_DONOTHING)
- PUDeletePopup(hWnd);
+ if (opts.popup_left_click_action != POPUP_ACTION_DONOTHING)
+ PUDeletePopup(hWnd);
- return TRUE;
- }
+ return TRUE;
- case WM_CONTEXTMENU:
- {
- PopupDataType* popup = (PopupDataType*)PUGetPluginData(hWnd);
- PostMessage(hPopupWindow, WMU_ACTION, (WPARAM)popup->plugin_data, opts.popup_right_click_action);
+ case WM_CONTEXTMENU:
+ PostMessage(hPopupWindow, WMU_ACTION, (WPARAM)popup->plugin_data, opts.popup_right_click_action);
- if (opts.popup_right_click_action != POPUP_ACTION_DONOTHING)
- PUDeletePopup(hWnd);
+ if (opts.popup_right_click_action != POPUP_ACTION_DONOTHING)
+ PUDeletePopup(hWnd);
- return TRUE;
- }
+ return TRUE;
- case UM_FREEPLUGINDATA:
- {
- PopupDataType* popup = (PopupDataType*)PUGetPluginData(hWnd);
- if ((INT_PTR)popup != CALLSERVICE_NOTFOUND)
- {
- DestroyIcon(popup->hIcon);
- mir_free(popup);
- }
- return FALSE; //the return value is ignored
+ case UM_FREEPLUGINDATA:
+ PopupDataType* popup = (PopupDataType*)PUGetPluginData(hWnd);
+ if ((INT_PTR)popup != CALLSERVICE_NOTFOUND) {
+ DestroyIcon(popup->hIcon);
+ mir_free(popup);
}
+ return FALSE; //the return value is ignored
}
return DefWindowProc(hWnd, message, wParam, lParam);
@@ -246,28 +239,21 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA static LRESULT CALLBACK DumbPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message) {
- case WM_COMMAND:
- {
- PUDeletePopup(hWnd);
- return TRUE;
- }
-
- case WM_CONTEXTMENU:
- {
- PUDeletePopup(hWnd);
- return TRUE;
- }
-
- case UM_FREEPLUGINDATA:
- {
- PopupDataType* popup = (PopupDataType*)PUGetPluginData(hWnd);
- if ((INT_PTR)popup != CALLSERVICE_NOTFOUND)
- {
- DestroyIcon(popup->hIcon);
- mir_free(popup);
- }
- return FALSE; //the return value is ignored
+ case WM_COMMAND:
+ PUDeletePopup(hWnd);
+ return TRUE;
+
+ case WM_CONTEXTMENU:
+ PUDeletePopup(hWnd);
+ return TRUE;
+
+ case UM_FREEPLUGINDATA:
+ PopupDataType* popup = (PopupDataType*)PUGetPluginData(hWnd);
+ if ((INT_PTR)popup != CALLSERVICE_NOTFOUND) {
+ DestroyIcon(popup->hIcon);
+ mir_free(popup);
}
+ return FALSE; //the return value is ignored
}
return DefWindowProc(hWnd, message, wParam, lParam);
|