Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - 12.1.1 menu accelerator keys problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

12.1.1 menu accelerator keys problem

 Post Reply Post Reply
Author
Message
rconn View Drop Down
Groupie
Groupie


Joined: 16 May 2007
Location: United States
Status: Offline
Points: 79
Post Options Post Options   Thanks (0) Thanks(0)   Quote rconn Quote  Post ReplyReply Direct Link To This Post Topic: 12.1.1 menu accelerator keys problem
    Posted: 31 December 2008 at 11:24pm
After upgrading to 12.1.1, I did a new install of our app and found that all of the accelerator keys were missing from the menu.
 
I traced it to  XTPShortcutManager.cpp.  At line 1416 in DoPropExchange, you're calling m_pAccelTable->RemoveAll() before checking to see if there is a saved accelerator table.  But the first time the app is run, there is no existing table, so the default accelerator table is destroyed and replaced with an empty one.  When the app exits, that empty table is saved, so the only way to ever get accelerator keys is to enter them manually in the customize menu dialog.
 
I made a change to move the RemoveAll() call down after nAccelSize is set; i.e.:
 
  1. if (pPX->IsAllowBlobValues())
  2. {
  3.   int nAccelSize = (int)pPX->ReadCount();
  4.   if ( nAccelSize ) {
  5.     m_pAccelTable->RemoveAll();
  6.     LPACCEL lpAccel = new ACCEL[nAccelSize];
  7.     pPX->Read(_T("Data"), lpAccel, nAccelSize* sizeof(ACCEL));
  8.     UpdateAcellTable(lpAccel, nAccelSize);
  9.     delete[] lpAccel;
  10. }
  11.  
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: 05 January 2009 at 2:02am
Hi,
 
Where you read customization from ? by default LoadCommandBars load it from registry and DoPropExchange not even called.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.