diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-14 12:19:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-14 12:19:39 +0300 |
commit | abf4069c2e3473da8f1d468e46c19951935a912f (patch) | |
tree | 2043f9159bf5f9ae9bd71ae7285c38f8ec1b4fd5 /plugins/TabSRMM/src/msgs.cpp | |
parent | 28664fa2341425bd0ece0ee457b0fa0982226a3a (diff) |
fixes #744
Diffstat (limited to 'plugins/TabSRMM/src/msgs.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 9049314a48..cd5e765b0c 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -835,33 +835,27 @@ void TSAPI CreateImageList(BOOL bInitial) PluginConfig.g_IconTypingEvent = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
}
-int TABSRMM_FireEvent(MCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType)
+int CTabBaseDlg::FireEvent(unsigned int type, unsigned int subType)
{
- if (hContact == 0 || hwnd == nullptr)
+ if (m_hContact == 0 || m_hwnd == nullptr)
return 0;
- CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_hwnd, GWLP_USERDATA);
if (dat == nullptr)
return 0;
MessageWindowEventData mwe = { sizeof(mwe) };
- mwe.hContact = hContact;
- mwe.hwndWindow = hwnd;
+ mwe.hContact = m_hContact;
+ mwe.hwndWindow = m_hwnd;
mwe.szModule = "tabSRMsgW";
mwe.uType = type;
- if (!dat->isChat()) {
- mwe.hwndInput = GetDlgItem(hwnd, IDC_MESSAGE);
- mwe.hwndLog = GetDlgItem(hwnd, IDC_LOG);
- }
- else {
- mwe.hwndInput = GetDlgItem(hwnd, IDC_MESSAGE);
- mwe.hwndLog = GetDlgItem(hwnd, IDC_LOG);
- }
+ mwe.hwndInput = m_message.GetHwnd();
+ mwe.hwndLog = m_log.GetHwnd();
if (type == MSG_WINDOW_EVT_CUSTOM) {
TABSRMM_SessionInfo se = { sizeof(se) };
se.evtCode = HIWORD(subType);
- se.hwnd = hwnd;
+ se.hwnd = m_hwnd;
se.extraFlags = (unsigned int)(LOWORD(subType));
se.local = dat->m_sendBuffer;
mwe.local = &se;
|