diff options
-rw-r--r-- | bin10/lib/mir_core.lib | bin | 31056 -> 31306 bytes | |||
-rw-r--r-- | bin10/lib/mir_core64.lib | bin | 28358 -> 28584 bytes | |||
-rw-r--r-- | bin11/lib/mir_core.lib | bin | 31056 -> 31306 bytes | |||
-rw-r--r-- | bin11/lib/mir_core64.lib | bin | 28358 -> 28584 bytes | |||
-rw-r--r-- | include/delphi/m_core.inc | 3 | ||||
-rw-r--r-- | include/m_core.h | 6 | ||||
-rw-r--r-- | src/mir_core/mir_core.def | 3 | ||||
-rw-r--r-- | src/mir_core/subclass.cpp | 11 |
8 files changed, 20 insertions, 3 deletions
diff --git a/bin10/lib/mir_core.lib b/bin10/lib/mir_core.lib Binary files differindex 4d0f826fed..25e1f00c7d 100644 --- a/bin10/lib/mir_core.lib +++ b/bin10/lib/mir_core.lib diff --git a/bin10/lib/mir_core64.lib b/bin10/lib/mir_core64.lib Binary files differindex 345447d0a2..e739998c67 100644 --- a/bin10/lib/mir_core64.lib +++ b/bin10/lib/mir_core64.lib diff --git a/bin11/lib/mir_core.lib b/bin11/lib/mir_core.lib Binary files differindex 7aa43eb650..8940e5edf3 100644 --- a/bin11/lib/mir_core.lib +++ b/bin11/lib/mir_core.lib diff --git a/bin11/lib/mir_core64.lib b/bin11/lib/mir_core64.lib Binary files differindex 2b4a861890..d4a01cdb13 100644 --- a/bin11/lib/mir_core64.lib +++ b/bin11/lib/mir_core64.lib diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index 595e02e16c..d52f5425bb 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -578,6 +578,9 @@ function mir_utf8checkstring(const astr:PAnsiChar):bool;stdcall; procedure mir_subclassWindow(Wnd: HWND; WndProc: WNDPROC); stdcall;
external CoreDLL name 'mir_subclassWindow';
+function mir_callNextSubclass(Wnd: HWND; WndProc: WNDPROC; uMsg: uint; wParam: WPARAM; lParam: LPARAM ): LRESULT; stdcall;
+ external CoreDLL name 'mir_callNextSubclass';
+
///////////////////////////////////////////////////////////////////////////////
procedure UnloadCoreModule(); stdcall;
diff --git a/include/m_core.h b/include/m_core.h index c1cb2260c6..6617f192d1 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -583,8 +583,10 @@ __forceinline char* mir_utf8decodeA(const char* src) ///////////////////////////////////////////////////////////////////////////////
// Window subclassing
-MIR_CORE_DLL(void) mir_subclassWindow(HWND hWnd, WNDPROC wndProc);
-MIR_CORE_DLL(void) KillModuleSubclassing(HMODULE hInst);
+MIR_CORE_DLL(void) mir_subclassWindow(HWND hWnd, WNDPROC wndProc);
+MIR_CORE_DLL(LRESULT) mir_callNextSubclass(HWND hWnd, WNDPROC wndProc, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+MIR_CORE_DLL(void) KillModuleSubclassing(HMODULE hInst);
///////////////////////////////////////////////////////////////////////////////
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++) {
|