You can modify an accelerator table, for either your application windows
or the system, by doing the following:
- Retrieve the handle of the accelerator table.
- Use that handle to copy the accelerator-table
data to an application-supplied buffer.
- Change the data in the buffer.
- Use the changed data to create a new accelerator
table.
Then you can use the new accelerator-table handle to set the accelerator
table, as outlined in the following list:
- Call WinQueryAccelTable to retrieve an accelerator-table
handle.
- Call WinCopyAccelTable with a NULL buffer handle
to determine how many bytes are in the table.
- Allocate sufficient memory for the accelerator-table
data.
- Call WinCopyAccelTable, with a pointer to the
allocated memory.
- Modify the data in the buffer (assuming it has
the form of an ACCELTABLE structure).
- Call WinCreateAccelTable, passing a pointer to
the buffer with the modified accelerator-table data.
- Call WinSetAccelTable with the handle returned
by WinCreateAccelTable.
[Back]
[Next]