home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / programm / 7072 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.1 KB  |  27 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!psinntp!panix!os2man
  3. From: os2man@panix.com (Larry Salomon Jr.)
  4. Subject: X-Windows like mouse/focus behavior (here's how)
  5. Message-ID: <1992Dec16.145017.23804@panix.com>
  6. Date: Wed, 16 Dec 1992 14:50:17 GMT
  7. Organization: PANIX Public Access Unix, NYC
  8. Lines: 17
  9.  
  10. For those interested, I've seen quite a few requests for this behavior.
  11. Although I haven't tried the below, it should work; no guarantees, however.
  12.  
  13. The strategy here is to install a system-wide HK_INPUT hook which follows
  14. the WM_MOUSEMOVE messages.  You can easily call WinWindowFromPoint() to
  15. obtain the window handle under the mouse, follow the parent chain until
  16. you reach the top-level window, and call WinSetFocus() to give it the focus.
  17.  
  18. Anyone want to give it a try?  If so, please post any changes to the above
  19. here and place the source on ftp-os2.nmsu.edu.  Thanks.
  20.  
  21. Cheers,
  22. Q
  23. -- 
  24. "If you choose not to decide, you  | "My other body is in the shop" - seen
  25.  still have made a choice" - Rush  |  on a T-shirt
  26. ------------------------------------------------------------------------
  27.