Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPShortcutManager good for per-window shortcuts?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPShortcutManager good for per-window shortcuts?

 Post Reply Post Reply
Author
Message
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Topic: CXTPShortcutManager good for per-window shortcuts?
    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?
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: 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
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post 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.
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.047 seconds.