summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat_window.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-17 21:30:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-17 21:30:32 +0300
commit5d1adca6a83289d3dcc23bc0af82193da69d9d96 (patch)
tree8ee7d5758389c54a02a5e1d6725d1b9b5cd70364 /plugins/TabSRMM/src/chat_window.cpp
parentee8fcfa82fa32a1b9a9a8123bf0e220c06779c0c (diff)
GetTabWindow applied to all another places
Diffstat (limited to 'plugins/TabSRMM/src/chat_window.cpp')
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp
index 6dd8682774..6fdf4e0cd4 100644
--- a/plugins/TabSRMM/src/chat_window.cpp
+++ b/plugins/TabSRMM/src/chat_window.cpp
@@ -771,15 +771,12 @@ void CChatRoomDlg::CloseTab()
i++;
TabCtrl_SetCurSel(m_hwndParent, i);
- TCITEM item = {};
- item.mask = TCIF_PARAM;
- TabCtrl_GetItem(m_hwndParent, i, &item); // retrieve dialog hwnd for the now active tab...
- m_pContainer->m_hwndActive = (HWND)item.lParam;
+ m_pContainer->m_hwndActive = GetTabWindow(m_hwndParent, i);
RECT rc;
SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
SetWindowPos(m_pContainer->m_hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
- ShowWindow((HWND)item.lParam, SW_SHOW);
+ ShowWindow(m_pContainer->m_hwndActive, SW_SHOW);
SetForegroundWindow(m_pContainer->m_hwndActive);
SetFocus(m_pContainer->m_hwndActive);
SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
@@ -2458,11 +2455,8 @@ void ShowRoom(TContainerData *pContainer, SESSION_INFO *si)
pContainer->iTabIndex = iCount;
if (iCount > 0) {
- TCITEM item = {};
for (int i = iCount - 1; i >= 0; i--) {
- item.mask = TCIF_PARAM;
- TabCtrl_GetItem(hwndTab, i, &item);
- HWND hwnd = (HWND)item.lParam;
+ HWND hwnd = GetTabWindow(hwndTab, i);
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (dat) {
int relPos = M.GetDword(dat->m_hContact, "tabindex", i * 100);