![]() |
CXTPShortcutManager good for per-window shortcuts? |
Post Reply ![]() |
Author | |
MacW ![]() Senior Member ![]() Joined: 26 June 2007 Status: Offline Points: 253 |
![]() ![]() ![]() ![]() ![]() 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? |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
MacW ![]() Senior Member ![]() Joined: 26 June 2007 Status: Offline Points: 253 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |