home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3881 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.4 KB  |  31 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!gatech!taco!garfield.catt.ncsu.edu!harris
  3. From: harris@garfield.catt.ncsu.edu (Michael Harris)
  4. Subject: Re: how to give program the focus?
  5. Message-ID: <harris.712456535@garfield.catt.ncsu.edu>
  6. Sender: news@ncsu.edu (USENET News System)
  7. Organization: North Carolina State University
  8. References: <9207292038.AA20166@data.src.honeywell.com>
  9. Date: Thu, 30 Jul 1992 00:35:35 GMT
  10. Lines: 19
  11.  
  12. bergstro@src.honeywell.com (Pete Bergstrom) writes:
  13.  
  14. >This may be a relatively easy answer, but I want to capture mouse button
  15. >clicks on my window.  I've done this by processing WM_BUTTON1DOWN and
  16. >I do get the coordinates I want.
  17.  
  18. >But, when I do this, the title bar for my window loses the focus
  19. >(grays out).  When this happens, I can't use ALT-F, etc key
  20. >combinations to navigate the menus until I explicitly click on the
  21. >title bar (or menu bar) again.
  22.  
  23. If you must process WM_BUTTON1DOWN, you should be sure to pass the message to
  24. the default window proc.  You can do this either before or after your
  25. processing.  I would suggest that you make a call to WinDefWindowProc() before
  26. you do your processing in the case statement.
  27. ______________________________________________________________________________
  28.      Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
  29.  System Administrator, Computer & Technologies Theme Program, NC State Univ.
  30. (My opinions are my own and do not represent those of NCSU or IBM Corporation)
  31.