Re: detection of key "esc"
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Sun, 10 Dec 2006 09:57:29 -0800
An accelerator command doesn't have to have a menu or toolbar equivalent.
Of course, you won't get the command visible to the Class Wizard without
that. You can put the command temporarily to the main menu, add the handlers
for it, add it to the acc table, and remove from menu.
I actually used this approach for ESC key for exactly same purpose as OP:
returning from fullscreen mode.
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:ik8bn25eti4dl7710d5869nlkdi4nl6nba@xxxxxxxxxx
Also, there are tricks to using accelerator keys in dialog-based apps, and
accelerators
don't work in dialogs, or if you are trying to restrict the scope somehow.
Also, if the
toolbars and menus are hidden, are they still activatable by accelerators?
(I don't know
the answer myself, never tried the experiment)
I *am* a PreTranslateMessagePhobe; I've seen it abused in some horrendous
ways, mostly by
people who can't outgrow raw Win32 API and think of everything in those
terms (the concept
of Message Map truly escapes them), but there are times when it really is
the ideal
solution to the problem.
joe
On Mon, 4 Dec 2006 20:30:27 -0800, "Tom Serface" <tserface@xxxxxxx> wrote:
Yeah, but for OP's application I think PreTranslateMessage() is a goodJoseph M. Newcomer [MVP]
spot
to do it (that's why I posted the code). I'm not sure it's the only good
spot to do it, but it's "a" good spot.
Tom
"Ajay Kalra" <ajaykalra@xxxxxxxxx> wrote in message
news:1165280211.515738.308490@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Tom Serface wrote:
I haven't tried that, but VK_ESCAPE is in the dropdown of virtual keys
so
perhaps that would work.
Thats why I was surprised at Joe's response. As this
PreTranslatemessage is in Mainframe (means it will get there more often
than not), that may be better, especially for
PreTranslateMessagePhobes.
---
Ajay
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- detection of key "esc"
- From: Alex
- Re: detection of key "esc"
- From: Tom Serface
- Re: detection of key "esc"
- From: Joseph M . Newcomer
- Re: detection of key "esc"
- From: Ajay Kalra
- Re: detection of key "esc"
- From: Tom Serface
- Re: detection of key "esc"
- From: Ajay Kalra
- Re: detection of key "esc"
- From: Tom Serface
- Re: detection of key "esc"
- From: Joseph M . Newcomer
- detection of key "esc"
- Prev by Date: Re: detection of key "esc"
- Next by Date: Re: display unicode db text in visual C++ mfc ide 2003
- Previous by thread: Re: detection of key "esc"
- Next by thread: Re: detection of key "esc"
- Index(es):
Relevant Pages
|