Print Page | Close Window

Accelerators...

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=15752
Printed Date: 03 July 2024 at 3:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Accelerators...
Posted By: feffe
Subject: Accelerators...
Date Posted: 01 December 2009 at 4:27am
Hi,
I've enabled accelerators in my MDI application calling
 

pCommandBars->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME);

 
in CMainFrame, I have this code:

BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)

{ int nID = (int)LOWORD(wParam);

  int nAcc = (int)HIWORD(wParam);
...
}
 
Well, in my application without Codejock, when for example I press "Canc", OnCommand is called and
nAcc value is 1 (TRUE).
Now I've modified my code with Codejock and OnCommand is still called, but now nAcc value is 0 (FALSE!).
 
Why this behavior?



Replies:
Posted By: Oleg
Date Posted: 01 December 2009 at 4:57am
Hello,
 
Yes, you are right - CXTPShortcutManager::TranslateAccelerator doesn't set accelerator flag.


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


Posted By: feffe
Date Posted: 01 December 2009 at 5:37am
Hi,
 
thanks for your reply.
 
TranslateAccelerators is not virtual.
 
Can I have Accelerators without CXTPShortcutManager or obtain this flag?
 
I need to route these commands from my mainframe to a tree shown in a dialog bar... and the dialog bar does not seem
to catch shortcuts
 
:(


Posted By: Oleg
Date Posted: 02 December 2009 at 4:50am
Hi,
 
Yes, if you don't need option for users to customize accelerators you can remove this line.


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



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