Re: Menu Not Available from Keyboard

From: Jonathan Wood (jwood_at_softcircuits.com)
Date: 01/04/05


Date: Mon, 3 Jan 2005 20:14:41 -0700

Hi Frank,

> I just created a test project that has a dialog bar and can not seem to
> duplicate your problem. The Alt-menu keys all work as expected. Can you
> elaborate a little on how you've created your dialog bar?

I assume you created a dialog template and placed it in the dialog bar,
correct?

Yes, I am doing something quite a bit more complex. I have an MDI
application and have added the CSizingControlBar docking windows
(http://www.datamekanix.com/). This is a free class that derives from
CControlBar. I derived from CSizingControlBar to create a CDockingWnd class.
This class creates an instance of another simple CWnd class called
CDockingPane, which is used for the client area of the docking window.
CDockingPane, in turn, creates an instance of yet another class that derives
from CTabCtrl. The class derived from CTabCtrl maintains child dialog
windows that are displayed depending on which tab is selected.

So I guess it isn't technically a CDialogBar. I added the code described in
Q117500 and my accelerator keys now work when one of the child dialog box
has the focus. But the Alt+menu keys do not work when the dialog box has the
focus.

One interesting thing I just tried: if I click on my tab control so that the
tab retains the focus, the Alt+menu keys DO work! But, again, they do not
work when the child dialog box has control.

I'm just not sure where to go from here.

-- 
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm
"Frank Hickman [MVP]" <fhickman_NOSP@M_noblesoft.com> wrote in message
news:TrlCd.9473$a_3.3214@fe04.lga...
>
> -- 
> ============
> Frank Hickman
> Microsoft MVP
> NobleSoft, Inc.
> ============
> Replace the _nosp@m_ with @ to reply.
>
>
> "Jonathan Wood" <jwood@softcircuits.com> wrote in message
> news:eg6husb8EHA.3260@TK2MSFTNGP14.phx.gbl...
> > Thanks to those who had suggestions with this problem. I'm still trying
to
> > fully resolve it.
> >
> > I used the technique in article Q117500 to override TranslateAccelerator
> > and
> > calling ::TranslateAccelerator using the HACCEL handle and window handle
> > from my main window. The result is that menu accelerators now work from
my
> > dialog window. However, the shortcuts (such as Alt+F for the File menu)
> > still do not work. I'm still looking for help on this if anyone here
> > understands this a little better than I.
> >
> > Again, I have a child modeless dialog box, and I want to be able to use
> > shortcut keys to access the menus on my main window when the child
> > modeless
> > dialog box has the focus.
> >
> > Thanks!
> >
> > -- 
> > Jonathan Wood
> > SoftCircuits
> > http://www.softcircuits.com
> > Available for consulting: http://www.softcircuits.com/jwood/resume.htm
> >
> > "Jonathan Wood" <jwood@softcircuits.com> wrote in message
> > news:u6Ts8ng7EHA.2552@TK2MSFTNGP09.phx.gbl...
> >> I have a modeless dialog box (contained in some dockable windows in an
> >> MDI
> >> app).
> >>
> >> Mostly, it's working okay but when a control in the dialog box has the
> >> focus, the main window menu is unavailable by keyboard (Alt+F, etc.
have
> > no
> >> effect).
> >>
> >> I've modelled my code after some other applications and notice the
menus
> > in
> >> these applications work even when the dialogs have the focus. Does
anyone
> >> have any suggestions on where I'd look to determine how to keep my
menus
> >> working?
> >>
> >> Thanks!
> >>
> >> -- 
> >> Jonathan Wood
> >> SoftCircuits
> >> http://www.softcircuits.com
> >> Available for consulting: http://www.softcircuits.com/jwood/resume.htm
> >>
> >>
> >
> >
>
>


Relevant Pages

  • Re: [PATCH] ncurses based config V2
    ... Fixed segfaults in help window. ... Added hot keys support. ... Optimized for 80x24 terminals. ... ESC prefix, I don't know). ...
    (Linux-Kernel)
  • Re: [PATCH] ncurses based config V2
    ... Fixed segfaults in help window. ... Removed the instructions window, made the instructions appear as a button ... Added hot keys support. ... ESC prefix, I don't know). ...
    (Linux-Kernel)
  • Re: SSH with PuTTY - Home/End keys dont work
    ... all is fine; the Home and End keys work. ... However, when I login from a Windows machine using the PuTTY client, ... Use tic -x scoansi-dm-cjc.ti to compile it into your terminfo database ... Close window on exit: ...
    (alt.os.linux.suse)
  • Re: [PATCH] ncurses based config V2
    ... Fixed segfaults in help window. ... Added hot keys support. ... of readability. ... ESC prefix, I don't know). ...
    (Linux-Kernel)
  • Re: Saving and Restoring a Child Window to its Former Position and Size
    ... The parent of this child is the main window of the applicaion and is ... I expected the attempt at restoration showed the relative position of the ... the upper left corner of the Main Window's client area. ...
    (microsoft.public.vc.mfc)