From 64c2fb8c4329d430a4894f154b47269693e31102 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Sep 2023 16:03:58 +0300 Subject: CSrmmBaseDialog::SetMessageText - move all low-level stuff inside a function --- plugins/TabSRMM/src/msgdialog.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/TabSRMM/src/msgdialog.cpp') diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index a5f22c0b82..8f6d86edb5 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -597,8 +597,7 @@ bool CMsgDialog::OnInitDialog() // restore saved msg if any... ptrW wszSavedMsg(g_plugin.getWStringA(m_hContact, "SavedMsg")); if (wszSavedMsg != 0) { - SETTEXTEX stx = { ST_DEFAULT, 1200 }; - m_message.SendMsg(EM_SETTEXTEX, (WPARAM)&stx, wszSavedMsg); + SetMessageText(wszSavedMsg, false); UpdateSaveAndSendButton(); if (m_pContainer->m_hwndActive == m_hwnd) UpdateReadChars(); @@ -938,8 +937,7 @@ void CMsgDialog::onClick_Quote(CCtrlButton*) } if (!szQuoted.IsEmpty()) { - SETTEXTEX stx = { ST_SELECTION, 1200 }; - m_message.SendMsg(EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)szQuoted.c_str()); + SetMessageText(szQuoted); SetFocus(m_message.GetHwnd()); } } -- cgit v1.2.3