Chgaccl.exe Switches Between Accelerator Tables in App

ID: Q80887


The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) versions 3.0, 3.1
  • Microsoft Windows 2000


SUMMARY

In some cases, it is useful to change the accelerator keys that are assigned to menu items in an application. Chgaccl.exe is a sample in the Microsoft Software Library that demonstrates how to change the accelerators by loading a different accelerator table from the RC file and modifying the text of menu items.


MORE INFORMATION

The following files are available for download from the Microsoft Download Center. Click the file names below to download the files:


Chgaccl.exe

For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address

http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.

Chgaccl.exe has two accelerator tables defined in the .RC file and a menu item that allows the user to "swap" accelerator tables. When the user chooses to swap the accelerators, the application loads the second accelerator table and modifies the menu to reflect the changes in the accelerators. The user can swap back to the original accelerator table by choosing swap accelerators from the menu a second time.

Dynaccel.exe is a second sample in the Microsoft Software Library that demonstrates how to build an accelerator table as part of an application. For additional information about Dynaccel.exe, please see the following article in the Microsoft Knowledge Base:
Q75738 SAMPLE: Dynaccel.exe Creates Accelerator Tables Dynamically
NOTE: Two (or more) instances of the application can be running, using different accelerators for each instance.

Chgaccl.exe also uses specific GDI functions to properly draw shapes in the client area of the window. Each time the user chooses a new shape from the menu, the client area device context is reset to properly define the window's background color, pen color, mapping mode, and compression factors.

Additional query words:

Keywords : kbfile kbsample kbInput kbKeyAccel kbGrpUser kbWinOS310 kbWinOS300
Version : WINDOWS:3.0,3.1
Platform : WINDOWS
Issue type :


Last Reviewed: January 27, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.