Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - [Closed] General MDI Accelerators Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[Closed] General MDI Accelerators Problem

 Post Reply Post Reply
Author
Message
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Topic: [Closed] General MDI Accelerators Problem
    Posted: 04 November 2006 at 4:01am
Hi Oleg,

In an MDI app. I'm having problems, some of which are seen in the Codejock samples. It would be great to get Accelerators working here, I can always add some keyboard hooks if needed as a workaround but would rather see if is a Simon problem (as it so often is).

[1] In the DockingPane\PaneSample why do the File menu's accelerators (Ctrl+N etc.) not work when a Pane has focus? They work when the View has focus.

More specifically, what do I have to do so that the acclerators work when the panes have focus? This answer may help with [2].

[2] I have a rather convoluted setup (see attached picture).
  • Accelerators do not work when my left-hand side dialog panes have focus.
  • Accelerators work 100% for the TaskPanel (Macros) pane.
  • The form has two CDialogs as children, accelerators do not work here.
Regarding the form - I have two controls on the dialog which hold the position for two CDialogs, I chose this approach as I want Command bars as you see. My only problem is the accelerators. I wonder if there is any other way of acheiving what I see here?

Screenshot here: http://www.hb9drv.ch/tmp/pics/dm001.jpg
Simon HB9DRV
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2006 at 3:03am
Hi,
 
Override PreTranslateMessage(MSG* pMsg) for your  dialogs and call CWnd::PreTranslateMessage instead of CDialog::PreTranslateMessage
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2006 at 5:02am
Originally posted by oleg oleg wrote:

Hi,
 
Override PreTranslateMessage(MSG* pMsg) for your  dialogs and call CWnd::PreTranslateMessage instead of CDialog::PreTranslateMessage


Well done - you really know MFC
Simon HB9DRV
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2006 at 10:51am
Hi Oleg,

FYI - to allow tabbing to work you must call CDialog::PreTranslateMessage for WM_KEYFIRST, WM_KEYDOWN, WM_KEYUP when wParam == VK_TAB.
Simon HB9DRV
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.