summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-15 20:23:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-15 20:23:12 +0300
commitd1bce64c343d78f4ca06406be784ac3669629708 (patch)
tree28cf15b832843d3a9f3acceb1c1ff91ec9957588 /plugins/TabSRMM/src
parent2c49a47dd937b34dc7f3cef22dca5aa21ccf81be (diff)
fixes #753 (broken tabs dragging)
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/container.cpp5
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp4
2 files changed, 4 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 3a86d7910c..da83b48369 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -43,11 +43,12 @@ static bool fForceOverlayIcons = false;
void TContainerData::UpdateTabs()
{
- int nTabs = TabCtrl_GetItemCount(hwnd);
+ HWND hwndTab = GetDlgItem(hwnd, IDC_MSGTABS);
+ int nTabs = TabCtrl_GetItemCount(hwndTab);
for (int i = 0; i < nTabs; i++) {
TCITEM tci;
tci.mask = TCIF_PARAM;
- if (!TabCtrl_GetItem(hwnd, i, &tci))
+ if (!TabCtrl_GetItem(hwndTab, i, &tci))
continue;
CTabBaseDlg *dat = (CTabBaseDlg*)GetWindowLongPtr((HWND)tci.lParam, GWLP_USERDATA);
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index 253ff90468..b4d1b6947f 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -1111,11 +1111,9 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
int i = GetTabItemFromMouse(hwnd, &pt);
if (i != -1) {
TCITEM tc;
- CSrmmWindow *dat = nullptr;
-
tc.mask = TCIF_PARAM;
TabCtrl_GetItem(hwnd, i, &tc);
- dat = (CSrmmWindow*)GetWindowLongPtr((HWND)tc.lParam, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr((HWND)tc.lParam, GWLP_USERDATA);
if (dat) {
tabdat->bDragging = TRUE;
tabdat->iBeginIndex = i;