summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/container.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-12 19:01:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-12 19:01:48 +0000
commit121411f52bccf78894c671d83d46cf38e05872c1 (patch)
treee4757cc25260fdbfed255c82605e0bb85ff8cb6d /plugins/TabSRMM/src/container.cpp
parent39746d1ae7f820035a9ebf2f6c6645c62270547e (diff)
fix for tabs creation in tabSRMM without Jabber.dll
git-svn-id: http://svn.miranda-ng.org/main/trunk@7622 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/container.cpp')
-rw-r--r--plugins/TabSRMM/src/container.cpp69
1 files changed, 35 insertions, 34 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 625ea14dc1..1b10afe812 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -490,52 +490,53 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
}
break;
case WM_SETTEXT:
- case WM_SETICON: {
+ case WM_SETICON:
if (CSkin::m_frameSkins) {
DefWindowProc(hwndDlg, msg, wParam, lParam);
RedrawWindow(hwndDlg, NULL, NULL, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW | RDW_NOCHILDREN);
return 0;
}
break;
- }
- case WM_NCHITTEST: {
- RECT r;
- POINT pt;
- int k = 0;
- int clip = CSkin::m_bClipBorder;
- if (!pContainer)
- break;
+ case WM_NCHITTEST:
+ {
+ RECT r;
+ POINT pt;
+ int k = 0;
+ int clip = CSkin::m_bClipBorder;
- if (!(pContainer->dwFlags & CNT_NOTITLE))
- break;
+ if (!pContainer)
+ break;
- GetWindowRect(hwndDlg, &r);
- GetCursorPos(&pt);
- if (pt.y <= r.bottom && pt.y >= r.bottom - clip - 6) {
- if (pt.x > r.left + clip + 10 && pt.x < r.right - clip - 10)
- return HTBOTTOM;
- if (pt.x < r.left + clip + 10)
- return HTBOTTOMLEFT;
- if (pt.x > r.right - clip - 10)
- return HTBOTTOMRIGHT;
+ if (!(pContainer->dwFlags & CNT_NOTITLE))
+ break;
+ GetWindowRect(hwndDlg, &r);
+ GetCursorPos(&pt);
+ if (pt.y <= r.bottom && pt.y >= r.bottom - clip - 6) {
+ if (pt.x > r.left + clip + 10 && pt.x < r.right - clip - 10)
+ return HTBOTTOM;
+ if (pt.x < r.left + clip + 10)
+ return HTBOTTOMLEFT;
+ if (pt.x > r.right - clip - 10)
+ return HTBOTTOMRIGHT;
+
+ }
+ else if (pt.y >= r.top && pt.y <= r.top + 6) {
+ if (pt.x > r.left + clip + 10 && pt.x < r.right - clip - 10)
+ return HTTOP;
+ if (pt.x < r.left + clip + 10)
+ return HTTOPLEFT;
+ if (pt.x > r.right - clip - 10)
+ return HTTOPRIGHT;
+ }
+ else if (pt.x >= r.left && pt.x <= r.left + clip + 6)
+ return HTLEFT;
+ else if (pt.x >= r.right - clip - 6 && pt.x <= r.right)
+ return HTRIGHT;
}
- else if (pt.y >= r.top && pt.y <= r.top + 6) {
- if (pt.x > r.left + clip + 10 && pt.x < r.right - clip - 10)
- return HTTOP;
- if (pt.x < r.left + clip + 10)
- return HTTOPLEFT;
- if (pt.x > r.right - clip - 10)
- return HTTOPRIGHT;
- }
- else if (pt.x >= r.left && pt.x <= r.left + clip + 6)
- return HTLEFT;
- else if (pt.x >= r.right - clip - 6 && pt.x <= r.right)
- return HTRIGHT;
-
return(DefWindowProc(hwndDlg, WM_NCHITTEST, wParam, lParam));
- }
+
case 0xae: // must be some undocumented message - seems it messes with the title bar...
if (CSkin::m_frameSkins)
return 0;