home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!utcsri!geac!torag!robohack!feline!king
- From: king@feline.uucp (KingLeon)
- Subject: Suppressing WM_LBUTTONDOWN message when reactivating a window?
- Message-ID: <1992Nov22.072400.6523@feline.uucp>
- Sender: Leon King
- Organization: Humber College Technology Dept.
- References: <none>
- Date: Sun, 22 Nov 1992 07:24:00 GMT
- Lines: 30
-
- Language: Borland C++
- Problem: Suppressing a WM_LBUTTONDOWN message when reactivating a window.
-
- I do have an inelegant solution to this problem involving two flags.
- This is what I am doing:
-
- My main window has some buttons and list boxes. When the window is
- activated by clicking on one of these then the selected items would
- change. So I set a flag when the window is activated and the next
- LBUTTONDOWN is ignored. Of course the window may be activated in
- other ways (selecting the nonclient area) or switching from the
- task manager, so I reset the flag so that the next LBUTTONDOWN is not
- ignored. I have another flag which I set when creating the app so
- that the first LBUTTONDOWN will not be ignored. The flags belong
- to a Window's extra memory words.
-
- What I'm trying to do is emulate proper Windows user interface behaviour.
- For example, clicking on a cell in an inactive spreadsheet will activate
- the spreadsheet, but not select the clicked on cell. (Clicking again
- will do this.) Ibid for a word processor, etc. Clicking outside a
- menu to make it go away should probably not cause a selection (but it
- does do so in other apps that I investigated.)
-
- My approach is kinda kludgy, may be dependent on message order (and
- would therefore probably not translate well to NT or other systems.)
- I may also be missing cases.
-
- Is there a better way to handle this?
-
-
-