Re: How to create a popup window which does not steal focus of its par
- From: "John Carson" <jcarson_n_o_sp_am_@xxxxxxxxxxxxxxx>
- Date: Sat, 11 Mar 2006 15:14:25 +1100
"Neo The One" <NeoTheOne@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CB3C17BD-3314-41AE-9165-9957BBD9A928@xxxxxxxxxxxxx
I want to have a popup window that in most ways behaves like a menu -
it does not steal focus from its parent window. Then I will create
other controls on this window and provide this window as shortcut
menu.
I think that menus do steal the focus. Go into any word processor/text
editor that has a right-click menu. Give the keyboard focus to the text
entry area and then right click to bring up the menu. Now hit any key that
does not correspond to an underlined letter on the menu. The computer will
beep at you and the keystroke will have no effect. Thus menus are in fact
like modal dialogs.
Only one window can have the focus at a time. Menus, floating toolbars and
various other things create the illusion that the focus is not being stolen
when in fact it is. You too can maintain the illusion by manipulating the
painting of the window's caption bar. See here for a discussion of the
techniques.
http://www.catch22.net/tuts/docking1.asp
--
John Carson
.
- Prev by Date: Re: Date and Time Picker - Removeing Drop Button?
- Next by Date: Re: Date and Time Picker - Removeing Drop Button?
- Previous by thread: Re: WM_PRINTCLIENT and LISTBOX
- Next by thread: MFC DataGrid View
- Index(es):
Relevant Pages
|