Re: Menu Not Available from Keyboard
From: Jonathan Wood (jwood_at_softcircuits.com)
Date: 01/04/05
- Next message: Frank Hickman [MVP]: "Re: A Question about CTreeCntrl"
- Previous message: ShipHead: "A Question about CTreeCntrl"
- In reply to: Frank Hickman [MVP]: "Re: Menu Not Available from Keyboard"
- Next in thread: Jonathan Wood: "Re: Menu Not Available from Keyboard"
- Messages sorted by: [ date ] [ thread ]
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 > >> > >> > > > > > >
- Next message: Frank Hickman [MVP]: "Re: A Question about CTreeCntrl"
- Previous message: ShipHead: "A Question about CTreeCntrl"
- In reply to: Frank Hickman [MVP]: "Re: Menu Not Available from Keyboard"
- Next in thread: Jonathan Wood: "Re: Menu Not Available from Keyboard"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|