summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-04-17 14:37:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-04-17 14:37:59 +0300
commit31a952e136448db75da48830c870af8eef6d1a03 (patch)
tree62354599d4f937db2be8604c9d9b49c3fdda1f01 /src
parent4a38c1650e8e4a66c266b5fc984a4c1407c286be (diff)
more common code incapsulated into mir_app.dll
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/chat_window.cpp3
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp2
-rw-r--r--src/mir_app/src/chat.h2
-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.cpp3
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp2
7 files changed, 6 insertions, 8 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 7eee70faef..adee9649c9 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -63,9 +63,6 @@ void CChatRoomDlg::OnInitDialog()
else
onActivate();
- // initialize toolbar icons
- Srmm_CreateToolbarIcons(m_hwnd, BBBF_ISCHATBUTTON);
-
m_log.SendMsg(EM_AUTOURLDETECT, 1, 0);
int mask = (int)m_log.SendMsg(EM_GETEVENTMASK, 0, 0);
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 152b5dfa16..d66a15cc00 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -156,8 +156,6 @@ void CSrmmWindow::OnInitDialog()
if (m_splitterPos == -1)
m_splitterPos = m_originalSplitterPos;
- Srmm_CreateToolbarIcons(m_hwnd, BBBF_ISIMBUTTON);
-
GetWindowRect(m_message.GetHwnd(), &m_minEditInit);
SendMessage(m_hwnd, DM_UPDATESIZEBAR, 0, 0);
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index cfc262e3eb..7fff02b700 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_popup.h>
#include <m_fontservice.h>
+void Srmm_CreateToolbarIcons(HWND hwndDlg, int flags);
+
struct MODULEINFO : public GCModuleInfoBase {};
struct SESSION_INFO : public GCSessionInfoBase {};
struct LOGSTREAMDATA : public GCLogStreamDataBase {};
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 68dbedb446..21ee8846f5 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -343,7 +343,6 @@ Miranda_OkToExit @344
Miranda_GetVersion @345
Miranda_GetFileVersion @346
Miranda_GetVersionText @347
-Srmm_CreateToolbarIcons @348
Netlib_CloseHandle @349
Netlib_Recv @350
Netlib_Send @351
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 5e8ad0beb4..1db051a51d 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -343,7 +343,6 @@ Miranda_OkToExit @344
Miranda_GetVersion @345
Miranda_GetFileVersion @346
Miranda_GetVersionText @347
-Srmm_CreateToolbarIcons @348
Netlib_CloseHandle @349
Netlib_Recv @350
Netlib_Send @351
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 55f43a5362..91040e3ecb 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -590,6 +590,9 @@ void CSrmmBaseDialog::OnInitDialog()
SetWindowLongPtr(m_nickList.GetHwnd(), GWLP_USERDATA, LPARAM(this));
mir_subclassWindow(m_nickList.GetHwnd(), stubNicklistProc);
+ // three buttons below are initiated inside this call, so button creation must precede subclassing
+ Srmm_CreateToolbarIcons(m_hwnd, isChat() ? BBBF_ISCHATBUTTON : BBBF_ISIMBUTTON);
+
mir_subclassWindow(m_btnFilter.GetHwnd(), Srmm_ButtonSubclassProc);
mir_subclassWindow(m_btnColor.GetHwnd(), Srmm_ButtonSubclassProc);
mir_subclassWindow(m_btnBkColor.GetHwnd(), Srmm_ButtonSubclassProc);
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 1469628d70..96ea229d53 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -317,7 +317,7 @@ MIR_APP_DLL(void) Srmm_ResetToolbar()
dwSepCount = 0;
}
-MIR_APP_DLL(void) Srmm_CreateToolbarIcons(HWND hwndDlg, int flags)
+void Srmm_CreateToolbarIcons(HWND hwndDlg, int flags)
{
HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtr(hwndDlg, GWLP_HINSTANCE);