summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/chat/window.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-09 17:28:47 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-09 17:28:47 +0300
commit2d737d50469b965c2787823a94757f4c9f0a7107 (patch)
tree34d46e0968485a7e9f16cbcbf9f4a18451ba06b1 /plugins/Scriver/src/chat/window.cpp
parent017f8e72ac56a88ecaea40dd1c52b1da0ae46986 (diff)
chat API:
- SESSION_INFO now addresses an instance of CChatRoomDlg instead of HWND; - linked list of sessions replaced with the usual LIST<>; - saveCI removed everywhere
Diffstat (limited to 'plugins/Scriver/src/chat/window.cpp')
-rw-r--r--plugins/Scriver/src/chat/window.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index c48e0c8ea5..9731065f73 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -426,9 +426,9 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
if (iFlags & GC_EVENT_ADDSTATUS)
iFlags |= GC_EVENT_REMOVESTATUS;
- SendMessage(si->hWnd, GC_CHANGEFILTERFLAG, 0, iFlags);
+ SendMessage(si->pDlg->GetHwnd(), GC_CHANGEFILTERFLAG, 0, iFlags);
if (si->bFilterEnabled)
- SendMessage(si->hWnd, GC_REDRAWLOG, 0, 0);
+ SendMessage(si->pDlg->GetHwnd(), GC_REDRAWLOG, 0, 0);
PostMessage(hwndDlg, WM_CLOSE, 0, 0);
}
break;
@@ -794,8 +794,8 @@ static void __cdecl phase2(void *lParam)
SESSION_INFO *si = (SESSION_INFO*)lParam;
Sleep(30);
- if (si && si->hWnd)
- PostMessage(si->hWnd, GC_REDRAWLOG2, 0, 0);
+ if (si && si->pDlg)
+ PostMessage(si->pDlg->GetHwnd(), GC_REDRAWLOG2, 0, 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -982,7 +982,7 @@ void CChatRoomDlg::OnDestroy()
{
NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSING);
- m_si->hWnd = nullptr;
+ m_si->pDlg = nullptr;
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, 0);
SendMessage(m_hwndParent, CM_REMOVECHILD, 0, (LPARAM)m_hwnd);
@@ -1443,7 +1443,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
SendMessage(m_hwnd, GC_FIXTABICONS, 0, 0);
- if (!m_si->hWnd) {
+ if (!m_si->pDlg) {
ShowRoom(m_si);
SendMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0);
}
@@ -1750,7 +1750,7 @@ void ShowRoom(SESSION_INFO *si)
return;
// Do we need to create a window?
- if (si->hWnd == nullptr) {
+ if (si->pDlg == nullptr) {
HWND hParent = GetParentWindow(si->hContact, TRUE);
CChatRoomDlg *pDlg = new CChatRoomDlg(si);
@@ -1758,11 +1758,11 @@ void ShowRoom(SESSION_INFO *si)
pDlg->Show();
pDlg->m_pParent = (ParentWindowData*)GetWindowLongPtr(hParent, GWLP_USERDATA);
- si->hWnd = pDlg->GetHwnd();
+ si->pDlg = pDlg;
}
- SendMessage(si->hWnd, DM_UPDATETABCONTROL, -1, (LPARAM)si);
- SendMessage(GetParent(si->hWnd), CM_ACTIVATECHILD, 0, (LPARAM)si->hWnd);
- SendMessage(GetParent(si->hWnd), CM_POPUPWINDOW, 0, (LPARAM)si->hWnd);
- SendMessage(si->hWnd, WM_MOUSEACTIVATE, 0, 0);
- SetFocus(GetDlgItem(si->hWnd, IDC_MESSAGE));
+ SendMessage(si->pDlg->GetHwnd(), DM_UPDATETABCONTROL, -1, (LPARAM)si);
+ SendMessage(GetParent(si->pDlg->GetHwnd()), CM_ACTIVATECHILD, 0, (LPARAM)si->pDlg->GetHwnd());
+ SendMessage(GetParent(si->pDlg->GetHwnd()), CM_POPUPWINDOW, 0, (LPARAM)si->pDlg->GetHwnd());
+ SendMessage(si->pDlg->GetHwnd(), WM_MOUSEACTIVATE, 0, 0);
+ SetFocus(GetDlgItem(si->pDlg->GetHwnd(), IDC_MESSAGE));
}