diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-12 19:01:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-12 19:01:48 +0000 |
commit | 121411f52bccf78894c671d83d46cf38e05872c1 (patch) | |
tree | e4757cc25260fdbfed255c82605e0bb85ff8cb6d /plugins/TabSRMM/src | |
parent | 39746d1ae7f820035a9ebf2f6c6645c62270547e (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')
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 69 | ||||
-rw-r--r-- | plugins/TabSRMM/src/functions.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 4 |
3 files changed, 38 insertions, 37 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;
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h index 021291068d..f095c0fb18 100644 --- a/plugins/TabSRMM/src/functions.h +++ b/plugins/TabSRMM/src/functions.h @@ -130,7 +130,7 @@ int TSAPI SetupIconLibConfig(); void TSAPI RTF_CTableInit();
INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int DbEventIsForMsgWindow(DBEVENTINFO *dbei);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 9e79d580cc..ec1ff5c391 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -422,7 +422,7 @@ int SplitmsgShutdown(void) DestroyCursor(PluginConfig.hCurSplitNS);
DestroyCursor(PluginConfig.hCurHyperlinkHand);
DestroyCursor(PluginConfig.hCurSplitWE);
- FreeLibrary(GetModuleHandleA("Msftedit.dll"));
+ FreeLibrary(GetModuleHandleA("riched20"));
if (g_hIconDLL) {
FreeLibrary(g_hIconDLL);
g_hIconDLL = NULL;
@@ -560,7 +560,7 @@ int LoadSendRecvMessageModule(void) icex.dwICC = ICC_COOL_CLASSES | ICC_BAR_CLASSES | ICC_LISTVIEW_CLASSES;
InitCommonControlsEx(&icex);
- Utils::loadSystemLibrary(L"\\Msftedit.dll");
+ Utils::loadSystemLibrary(L"\\riched20.dll");
OleInitialize(NULL);
mREOLECallback = new REOLECallback;
|