Re: keyboard events for different CWnds

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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



.



Relevant Pages

  • keyboard events for different CWnds
    ... used to capture keyboard inputs for some dialog class CTestDialog and ... the mainframe and others to the child frame and perhaps certain others ... MainFrame) and Ctrl+C copies content in the child window (message goes ...
    (microsoft.public.vc.mfc)
  • Re: getwindowtext() api for password mask ...
    ... Make a global hook: Is this way as the hook resides in a dll that get loaded in every process you can send the WM_GETTEXT message from within the same process that the window belong. ...
    (borland.public.delphi.nativeapi)
  • Re: Processes: Threads ?????
    ... and also that the GetWindowThreadProcessId function ... >process that created the window. ... A thread must belong to a process. ... VB app, the VB runtime always creates at least one non-visible window. ...
    (microsoft.public.vb.winapi)
  • Re: Problem with Window.Close()
    ... the winow is not belong to me. ... But when i open few IE browser, ... >> I'm using window.close() to close the window. ... The window where your entry page opens is not yours. ...
    (microsoft.public.scripting.jscript)
  • Re: Choice between CMOS 4099 or 74HC259
    ... since 4099 belong to ice age now. ... just like window 3.1 and 95. ... Prev by Date: ...
    (comp.arch.embedded)