summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2020-05-01 23:43:49 +0300
committerMataes <mataes2007@gmail.com>2020-05-01 23:44:21 +0300
commit82011595ca58ce31524a07954150a6022475987e (patch)
treed2f0e03ec66ba403935caeacb0c1ccf6bb5ec913 /plugins
parent31b227b664aff40b7e48e17506ae34c6a24e88fd (diff)
newstory: add function OnContextMenu
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/history_control.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 5a44e50107..419161855f 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -33,6 +33,11 @@ struct NewstoryListData : public MZeroedObject
HWND hwnd;
HWND hwndEditBox;
+ void OnContextMenu(int index)
+ {
+ ItemData* item = items.get(index, ItemData::ELM_DATA);
+ }
+
void BeginEditItem(int index)
{
if (hwndEditBox)
@@ -924,9 +929,8 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case WM_CONTEXTMENU:
{
- HMENU menu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_POPUPS));
- HMENU submenu = GetSubMenu(menu, 2);
- TranslateMenu(submenu);
+ int index = SendMessage(hwnd, NSM_GETITEMFROMPIXEL, LOWORD(lParam), HIWORD(lParam));
+ data->OnContextMenu(index);
}
break;
}