现在的位置: 首页 > 综合 > 正文

Loading the Accelerator Table

2013年02月07日 ⁄ 综合 ⁄ 共 541字 ⁄ 字号 评论关闭
 

Within your program, you use the LoadAccelerators function to load the accelerator table into memory and obtain a handle to it. The LoadAccelerators statement is similar to the LoadIcon, LoadCursor, and LoadMenu statements.

First define a handle to an accelerator table as type HANDLE:

HANDLE hAccel ;

Then load the accelerator table:

hAccel = LoadAccelerators (hInstance, TEXT ("MyAccelerators")) ;

As with icons, cursors, and menus, you can use a number for the accelerator table name and then use that number in the LoadAccelerators statement with the MAKEINTRESOURCE macro or enclosed in quotation marks and preceded by a # character.

抱歉!评论已关闭.