From 2dcb2ff9a79ebce4e3fae19a851f83e3c7d41474 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 3 Mar 2013 12:56:10 +0000 Subject: forgotten another function: mir_callNextSubclass git-svn-id: http://svn.miranda-ng.org/main/trunk@3870 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/mir_core.def | 3 ++- src/mir_core/subclass.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src/mir_core') diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def index 3c1174c74b..a5978b9ddb 100644 --- a/src/mir_core/mir_core.def +++ b/src/mir_core/mir_core.def @@ -137,4 +137,5 @@ db_find_next @134 Icon_Register @135 Icon_RegisterT @136 mir_subclassWindow @137 -KillModuleSubclassing @138 +mir_callNextSubclass @138 +KillModuleSubclassing @139 diff --git a/src/mir_core/subclass.cpp b/src/mir_core/subclass.cpp index 50cc8e3920..a526aeb9bf 100644 --- a/src/mir_core/subclass.cpp +++ b/src/mir_core/subclass.cpp @@ -69,6 +69,17 @@ MIR_CORE_DLL(void) mir_subclassWindow(HWND hWnd, WNDPROC wndProc) p->m_hooks[p->m_iHooks++] = wndProc; } +MIR_CORE_DLL(LRESULT) mir_callNextSubclass(HWND hWnd, WNDPROC wndProc, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + MSubclassData *p = arSubclass.find((MSubclassData*)&hWnd); + if (p) + for (int i=0; i < p->m_iHooks-1; i++) + if (p->m_hooks[i] == wndProc) + return p->m_hooks[i+1](hWnd, uMsg, wParam, lParam); + + return DefWindowProc(hWnd, uMsg, wParam, lParam); +} + MIR_CORE_DLL(void) KillModuleSubclassing(HMODULE hInst) { for (int i=0; i < arSubclass.getCount(); i++) { -- cgit v1.2.3