Article View: comp.os.ms-windows.programmer.misc
Article #1943help gwl_wndproc
From: chris snell
Date: Sun, 03 Jan 1993 12:53
Date: Sun, 03 Jan 1993 12:53
27 lines
1665 bytes
1665 bytes
Before I ask my next question I would like to thank two people who have
helped me before: Stephen Groundwater for drag & drop server information,
and Brett Manz for revealing the stm_SetIcon message to me. Thank you.
And now, could anyone tell me the correct method of calling the procedure
address returned by GetWindowLong(hWnd, gwl_WndProc)?
I want to intercept one message from another application, so I get the
address of the window function with OldWndProc:=GetWindowLong(hWnd,
gwl_WndProc), and substitute a new window function with
SetWindowLong(hWnd, gwl_WndProc, longint(@MyNewProc)), and my new function
gets all the window messages, which is what I want. But when I try to pass
the messages I don't want to intercept on to the OldWndProc, I get a
general protection fault. How do I pass the unwanted messages on to the
other application?
As you can tell, I am using Turbo Pascal for Windows, but a C example
(perhaps with some commenting) I should be able to understand.
Thanks to anyone who responds,
chris.snell@canrem.com
---
WMR #1 I was on a roll, until I slipped on the butter.
--
Canada Remote Systems - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
Technical Details
Message-ID:
<19933.3151.3076@dosgate>Path:
arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!canrem!dosgate!dosgate![chris.snell@canrem.com]Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!canrem!dosgate!dosgate![chris.snell@canrem.com] From: "chris snell" <chris.snell@canrem.com> Subject: help gwl_wndproc Message-ID: <19933.3151.3076@dosgate> Reply-To: "chris snell" <chris.snell@canrem.com> Organization: Canada Remote Systems Distribution: comp Date: 3 Jan 93 07:53:47 EST Lines: 27