diff options
author | Mataes <mataes2007@gmail.com> | 2020-05-01 19:32:07 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2020-05-01 19:32:07 +0300 |
commit | 5d44e9ca01dd29effb753a7adeddf041f05526a6 (patch) | |
tree | c4883b952f531de423117ed30b51caec584a5d84 /plugins/NewStory/src | |
parent | 504c7a76bb9b10c6ccb7883693661ef5d085c686 (diff) |
newstory: more correct place
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r-- | plugins/NewStory/src/history.cpp | 8 | ||||
-rw-r--r-- | plugins/NewStory/src/history_control.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp index 822ba6c3eb..d00839b515 100644 --- a/plugins/NewStory/src/history.cpp +++ b/plugins/NewStory/src/history.cpp @@ -367,8 +367,6 @@ public: edtSearchText.OnChange = Callback(this, &CHistoryDlg::onChange_SearchText); - m_histControl.OnBuildMenu = Callback(this, &CHistoryDlg::OnContextMenu); - btnCopy.OnClick = Callback(this, &CHistoryDlg::onClick_Copy); btnExport.OnClick = Callback(this, &CHistoryDlg::onClick_Export); btnDelete.OnClick = Callback(this, &CHistoryDlg::onClick_Delete); @@ -787,12 +785,6 @@ public: PostMessage(m_hwnd, UM_REBUILDLIST, 0, 0); } - void OnContextMenu(CCtrlBase*) - { - RECT rc; - GetWindowRect(m_histControl.GetHwnd(), &rc); - } - INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override { if ((msg >= NSM_FIRST) && (msg < NSM_LAST)) { diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 2621bf6d43..5a44e50107 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -921,6 +921,14 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM delete data; SetWindowLongPtr(hwnd, 0, 0); break; + + case WM_CONTEXTMENU: + { + HMENU menu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_POPUPS)); + HMENU submenu = GetSubMenu(menu, 2); + TranslateMenu(submenu); + } + break; } return DefWindowProc(hwnd, msg, wParam, lParam); |