diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-04 19:57:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-04 19:57:20 +0000 |
commit | 011c86b22aa67f25d751f731501eaaec9600f44c (patch) | |
tree | c48c84bc91dcd97975a4996d5cffee41ff873fea /src | |
parent | a9e2b96e8d4664fddea569f0c233bc0b028555f1 (diff) |
fix for the smileys cleanup procedure
git-svn-id: http://svn.miranda-ng.org/main/trunk@3887 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_core/subclass.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/mir_core/subclass.cpp b/src/mir_core/subclass.cpp index 40fa3c6b95..183556402d 100644 --- a/src/mir_core/subclass.cpp +++ b/src/mir_core/subclass.cpp @@ -33,6 +33,8 @@ struct MSubclassData static LIST<MSubclassData> arSubclass(10, LIST<MSubclassData>::FTSortFunc(HandleKeySortT));
+/////////////////////////////////////////////////////////////////////////////////////////
+
static LRESULT CALLBACK MSubclassWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
MSubclassData *p = arSubclass.find((MSubclassData*)&hwnd);
@@ -92,6 +94,14 @@ MIR_CORE_DLL(void) mir_subclassWindowFull(HWND hWnd, WNDPROC wndProc, WNDPROC ol p->m_hooks[p->m_iHooks++] = wndProc;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+MIR_CORE_DLL(void) mir_unsubclassWindow(HWND hWnd)
+{
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
MIR_CORE_DLL(LRESULT) mir_callNextSubclass(HWND hWnd, WNDPROC wndProc, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
MSubclassData *p = arSubclass.find((MSubclassData*)&hWnd);
@@ -109,10 +119,17 @@ MIR_CORE_DLL(LRESULT) mir_callNextSubclass(HWND hWnd, WNDPROC wndProc, UINT uMsg delete p;
SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)saveProc);
- return CallWindowProc(saveProc, hWnd, uMsg, wParam, lParam);
+ LONG res = 0;
+ __try {
+ res = saveProc(hWnd, uMsg, wParam, lParam);
+ }
+ __except(EXCEPTION_EXECUTE_HANDLER)
+ {
+ }
+ return res;
}
- return CallWindowProc(p->m_origWndProc, hWnd, uMsg, wParam, lParam);
+ return p->m_origWndProc(hWnd, uMsg, wParam, lParam);
}
}
@@ -122,6 +139,8 @@ MIR_CORE_DLL(LRESULT) mir_callNextSubclass(HWND hWnd, WNDPROC wndProc, UINT uMsg return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
MIR_CORE_DLL(void) KillModuleSubclassing(HMODULE hInst)
{
for (int i=0; i < arSubclass.getCount(); i++) {
|