summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-28 14:18:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-28 14:18:31 +0300
commit6a9e3738066370dac38f5f6768b8a6f61fe709e0 (patch)
tree035d3b553c313505707f236e6c9c973416e1be65 /src/mir_app
parentb60c918dbcb16f4da7c35c15b190ee9def957a49 (diff)
SRMM notifications went to the core with ME_MSG_WINDOWEVENT
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/srmm_base.cpp17
3 files changed, 19 insertions, 0 deletions
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 9e7da2d190..8b65c2bcb6 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -444,3 +444,4 @@ _stubLogProc@16 @446 NONAME
_stubMessageProc@16 @447 NONAME
_stubNicklistProc@16 @448 NONAME
Chat_GetTextPixelSize @449 NONAME
+?NotifyEvent@CSrmmBaseDialog@@IAEHH@Z @450 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index fd8431c520..856beb7707 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -444,3 +444,4 @@ stubLogProc @446 NONAME
stubMessageProc @447 NONAME
stubNicklistProc @448 NONAME
Chat_GetTextPixelSize @449 NONAME
+?NotifyEvent@CSrmmBaseDialog@@IEAAHH@Z @450 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 01b401f1f2..9543f2e1e5 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -812,6 +812,23 @@ void CSrmmBaseDialog::onDblClick_List(CCtrlListBox *pList)
/////////////////////////////////////////////////////////////////////////////////////////
+extern HANDLE hHookSrmmEvent;
+
+int CSrmmBaseDialog::NotifyEvent(int code)
+{
+ if (m_hContact == 0 && m_hwnd == nullptr)
+ return -1;
+
+ MessageWindowEventData mwe = {};
+ mwe.hContact = m_hContact;
+ mwe.hwndWindow = m_hwnd;
+ mwe.uType = code;
+ mwe.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
+ mwe.hwndInput = m_message.GetHwnd();
+ mwe.hwndLog = m_log.GetHwnd();
+ return ::NotifyEventHooks(hHookSrmmEvent, 0, (LPARAM)&mwe);
+}
+
bool CSrmmBaseDialog::ProcessHotkeys(int key, bool isShift, bool isCtrl, bool isAlt)
{
// Esc (close tab)