From 7f513673b523ecfbf6ded0a2d0e5cdf5496bd6b0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 3 Apr 2017 23:52:09 +0300 Subject: - SRMM window list management moved to the base class; - fixes #791 --- plugins/Scriver/src/msgdialog.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'plugins/Scriver/src/msgdialog.cpp') diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 03099767dd..1dce87450c 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -170,7 +170,7 @@ static INT_PTR CALLBACK ConfirmSendAllDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa ///////////////////////////////////////////////////////////////////////////////////////// -CSrmmWindow::CSrmmWindow(MCONTACT hContact, bool bIncoming, const char *szInitialText, bool bIsUnicode) +CSrmmWindow::CSrmmWindow(MCONTACT hContact, bool bIncoming) : CScriverWindow(IDD_MSG), m_bIncoming(bIncoming), m_splitter(this, IDC_SPLITTERY), @@ -184,7 +184,6 @@ CSrmmWindow::CSrmmWindow(MCONTACT hContact, bool bIncoming, const char *szInitia m_hContact = hContact; m_hwndParent = GetParentWindow(hContact, FALSE); - m_wszInitialText = (bIsUnicode) ? mir_wstrdup((wchar_t*)szInitialText) : mir_a2u(szInitialText); m_btnOk.OnClick = Callback(this, &CSrmmWindow::onClick_Ok); m_btnAdd.OnClick = Callback(this, &CSrmmWindow::onClick_Add); @@ -201,9 +200,6 @@ void CSrmmWindow::OnInitDialog() { CSuper::OnInitDialog(); - SetWindowLongPtr(m_hwnd, GWLP_USERDATA, (LONG_PTR)this); - WindowList_Add(pci->hWindowList, m_hwnd, m_hContact); - NotifyEvent(MSG_WINDOW_EVT_OPENING); m_pParent = (ParentWindowData *)GetWindowLongPtr(m_hwndParent, GWLP_USERDATA); @@ -424,7 +420,6 @@ void CSrmmWindow::OnDestroy() } tcmdlist_free(cmdList); - WindowList_Remove(pci->hWindowList, m_hwnd); HFONT hFont = (HFONT)m_message.SendMsg(WM_GETFONT, 0, 0); if (hFont != nullptr && hFont != (HFONT)m_btnOk.SendMsg(WM_GETFONT, 0, 0)) @@ -435,7 +430,6 @@ void CSrmmWindow::OnDestroy() if (db_get_b(m_hContact, "CList", "NotOnList", 0)) db_delete_contact(m_hContact); - SetWindowLongPtr(m_hwnd, GWLP_USERDATA, 0); SendMessage(m_hwndParent, CM_REMOVECHILD, 0, (LPARAM)m_hwnd); if (m_hwndIeview != nullptr) { IEVIEWWINDOW ieWindow = { sizeof(ieWindow) }; -- cgit v1.2.3