Re: keyboard events for different CWnds
- From: "AliR \(VC++ MVP\)" <AliR@xxxxxxxxxxxxx>
- Date: Mon, 30 Oct 2006 12:45:12 -0600
The best way for that is to use a Accelerator table. And handle the
different messages in the window that they belong to.
AliR.
"divya_rathore_@xxxxxxxxx" <divyarathore@xxxxxxxxx> wrote in message
news:1162227959.128583.117130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
We know that BOOL CTestDialog::PreTranslateMessage(MSG *pMsg) can be
used to capture keyboard inputs for some dialog class CTestDialog and
in general any window.
But consider this..
If I have a MDI application and therein certain Key strokes 'belong' to
the mainframe and others to the child frame and perhaps certain others
to some other pane or whatever, what is the best way to implement this?
For instance, Ctrl+S saves a file in many apps (message goes to
MainFrame) and Ctrl+C copies content in the child window (message goes
to ChildFrame). What If I want customized key presses for different
tasks corresponding to different Wnd objects (each key press unique, if
really needed, to differentiate the CWnds)?
TiA,
D Rathore
.
- References:
- keyboard events for different CWnds
- From: divya_rathore_@xxxxxxxxx
- keyboard events for different CWnds
- Prev by Date: Re: keyboard events for different CWnds
- Next by Date: Re: Downloadin from Internet
- Previous by thread: Re: keyboard events for different CWnds
- Next by thread: Internet Explorer vertical OnSize / OnSetExtent problem
- Index(es):
Relevant Pages
|