|  | 
| Accelerators... | 
| Post Reply   | 
| Author | |
| feffe   Groupie   Joined: 04 September 2009 Status: Offline Points: 56 |  Post Options  Thanks(0)  Quote  Reply  Topic: Accelerators... 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? | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  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 | |
|  | |
| feffe   Groupie   Joined: 04 September 2009 Status: Offline Points: 56 |  Post Options  Thanks(0)  Quote  Reply  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  :( | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  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 | |
|  | |
| 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 |