summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/generic_msghandlers.cpp
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2015-03-02 02:28:49 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2015-03-02 02:28:49 +0000
commitb6c1c9f09ada59b7f363b9f51e4a29fc15a7de37 (patch)
treeea9e52c2e29374dd27671e9f94edd951e7f4250d /plugins/TabSRMM/src/generic_msghandlers.cpp
parent5decb665b2020761bcd4deee3af25bd75597b4af (diff)
TabSRMM: wine fix for tab paint on mouse move, code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12296 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/generic_msghandlers.cpp')
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index a5d59698ad..4cdb399389 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1166,11 +1166,11 @@ HWND TSAPI DM_CreateClist(TWindowData *dat)
LRESULT TSAPI DM_MouseWheelHandler(HWND hwnd, HWND hwndParent, TWindowData *mwdat, WPARAM wParam, LPARAM lParam)
{
+ POINT pt;
RECT rc, rc1;
UINT uID = mwdat->bType == SESSIONTYPE_IM ? IDC_LOG : IDC_CHAT_LOG;
UINT uIDMsg = mwdat->bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_CHAT_MESSAGE;
- POINT pt;
GetCursorPos(&pt);
GetWindowRect(hwnd, &rc);
if (PtInRect(&rc, pt))
@@ -1218,11 +1218,7 @@ LRESULT TSAPI DM_MouseWheelHandler(HWND hwnd, HWND hwndParent, TWindowData *mwda
}
HWND hwndTab = GetDlgItem(mwdat->pContainer->hwnd, IDC_MSGTABS);
- TCHITTESTINFO hti;
- GetCursorPos(&hti.pt);
- ScreenToClient(hwndTab, &hti.pt);
- hti.flags = 0;
- if (TabCtrl_HitTest(hwndTab, &hti) != -1) {
+ if (GetTabItemFromMouse(hwndTab, &pt) != -1) {
SendMessage(hwndTab, WM_MOUSEWHEEL, wParam, -1);
return 0;
}