Print Page | Close Window

CXTPShortcutManager good for per-window shortcuts?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=10571
Printed Date: 15 November 2025 at 12:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPShortcutManager good for per-window shortcuts?
Posted By: MacW
Subject: CXTPShortcutManager good for per-window shortcuts?
Date Posted: 09 May 2008 at 9:03am
Hi,

my application uses multiple sub-windows and panels. Each window/panel may have its own set of accelerator keys, menus etc.

I handle this by setting the accelerator table in OnSetFocus, and restoring the previous table in KillFocus. While migrating this to XMP, I found the class CXTPShortcutManager.

Since the documentation is as usual sparse, and all examples only handle the simple case of one accelerator table per application, I wonder if CXTPShortcutManager would be helpful for my case.

Has anybody here used this class in other ways than the simple usage shown in the Codejock samples? Perhaps even in a dynamic application with "per-window" keyboard shortcuts?



Replies:
Posted By: Oleg
Date Posted: 10 May 2008 at 4:23am

Hi,

You can try assign instance of CXTPShortcutManager for each Panel and call pShortcutManager->TranslateAccelerator() in PretranslateMessage of each pane.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: MacW
Date Posted: 10 May 2008 at 6:22am
Hi, Oleg

thanks for the swift reply!
This answers my question.

This approach would be pretty similar to what I already have. My base pane class does all the accelerator table handling automatically, so I would not gain much from switching to the XTP shortcut manager.

Unless there is some cool functionality in the XTP shortcut manager I'm missing, I guess I'll stick to what I have for now.



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