CreateAcceleratorTableW function (winuser.h)
Creates an accelerator table.
Syntax
HACCEL CreateAcceleratorTableW(
[in] LPACCEL paccel,
[in] int cAccel
);
Parameters
[in] paccel
Type: LPACCEL
An array of ACCEL structures that describes the accelerator table.
[in] cAccel
Type: int
The number of ACCEL structures in the array. This must be within the range 1 to 32767 or the function will fail.
Return value
Type: HACCEL
If the function succeeds, the return value is the handle to the created accelerator table; otherwise, it is NULL. To get extended error information, call GetLastError.
Remarks
Before an application closes, it can use the DestroyAcceleratorTable function to destroy any accelerator tables that it created by using the CreateAcceleratorTable function.
Examples
For an example, see Creating User Editable Accelerators.
Note
The winuser.h header defines CreateAcceleratorTable as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
See also
Conceptual
Reference