Print Page | Close Window

[Closed] General MDI Accelerators Problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=5427
Printed Date: 24 May 2024 at 8:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [Closed] General MDI Accelerators Problem
Posted By: Simon HB9DRV
Subject: [Closed] General MDI Accelerators Problem
Date 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 - http://www.hb9drv.ch/tmp/pics/dm001.jpg


-------------
Simon HB9DRV



Replies:
Posted By: Oleg
Date 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


Posted By: Simon HB9DRV
Date 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


Posted By: Simon HB9DRV
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net