home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!cs.utexas.edu!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
- From: dic5340@hertz.njit.edu (David Charlap)
- Newsgroups: comp.os.os2.programmer
- Subject: Re: how to give program the focus?
- Message-ID: <1992Jul30.212808.29729@njitgw.njit.edu>
- Date: 30 Jul 92 21:28:08 GMT
- References: <9207292038.AA20166@data.src.honeywell.com>
- Sender: news@njit.edu
- Organization: New Jersey Institute of Technology, Newark, N.J.
- Lines: 32
- Nntp-Posting-Host: hertz.njit.edu
-
- In article <9207292038.AA20166@data.src.honeywell.com> bergstro@src.honeywell.com (Pete Bergstrom) writes:
- >
- >This may be a relatively easy answer, but I want to capture mouse button
- >clicks on my window. I've done this by processing WM_BUTTON1DOWN and
- >I do get the coordinates I want.
- >
- >But, when I do this, the title bar for my window loses the focus
- >(grays out). When this happens, I can't use ALT-F, etc key
- >combinations to navigate the menus until I explicitly click on the
- >title bar (or menu bar) again.
- >
- >So, how do I make sure that the window retains the focus?
-
- Could you post the code fragment?
-
- Anyhow, I've two ideas.
-
- 1) Is the message handler associated with the window or with the
- frame? I think message handlers should be associated with the
- frame.
-
- 2) At the end of your handler, are you calling WinDefWindowProc()?
- This is especially important, or you won't get any default handling
- for the other messages.
-
-
-
- --
- |) David Charlap "I don't even represent myself
- /|_ dic5340@hertz.njit.edu sometimes so NJIT is right out!.
- ((|,)
- ~|~ Hi! I am a .signature virus, copy me into your .signature file.
-