Print Page | Close Window

12.1.1 menu accelerator keys problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=13051
Printed Date: 14 September 2025 at 5:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: 12.1.1 menu accelerator keys problem
Posted By: rconn
Subject: 12.1.1 menu accelerator keys problem
Date 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.  



Replies:
Posted By: Oleg
Date 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



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