home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / mswindo / programm / misc / 4554 < prev    next >
Encoding:
Text File  |  1993-01-03  |  1.6 KB  |  39 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!uunet.ca!canrem!dosgate!dosgate![chris.snell@canrem.com]
  3. From: "chris snell" <chris.snell@canrem.com>
  4. Subject: help gwl_wndproc
  5. Message-ID: <19933.3151.3076@dosgate>
  6. Reply-To: "chris snell" <chris.snell@canrem.com>
  7. Organization: Canada Remote Systems
  8. Distribution: comp
  9. Date: 3 Jan 93 07:53:47 EST
  10. Lines: 27
  11.  
  12. Before I ask my next question I would like to thank two people who have 
  13. helped me before: Stephen Groundwater for drag & drop server information, 
  14. and Brett Manz for revealing the stm_SetIcon message to me. Thank you.
  15.  
  16. And now, could anyone tell me the correct method of calling the procedure 
  17. address returned by GetWindowLong(hWnd, gwl_WndProc)?
  18.  
  19. I want to intercept one message from another application, so I get the 
  20. address of the window function with OldWndProc:=GetWindowLong(hWnd, 
  21. gwl_WndProc), and substitute a new window function with 
  22. SetWindowLong(hWnd, gwl_WndProc, longint(@MyNewProc)), and my new function 
  23. gets all the window messages, which is what I want. But when I try to pass 
  24. the messages I don't want to intercept on to the OldWndProc, I get a 
  25. general protection fault. How do I pass the unwanted messages on to the 
  26. other application?
  27.  
  28. As you can tell, I am using Turbo Pascal for Windows, but a C example 
  29. (perhaps with some commenting) I should be able to understand.
  30.  
  31. Thanks to anyone who responds,
  32.                                         chris.snell@canrem.com
  33.  
  34. ---
  35. WMR #1 I was on a roll, until I slipped on the butter.
  36. --
  37. Canada Remote Systems  - Toronto, Ontario
  38. World's Largest PCBOARD System - 416-629-7000/629-7044
  39.