LoadAcceleratorsA function

Loads the specified accelerator table.

Syntax

HACCEL LoadAcceleratorsA(
  HINSTANCE hInstance,
  LPCSTR    lpTableName
);

Parameters

hInstance

Type: HINSTANCE

A handle to the module whose executable file contains the accelerator table to be loaded.

lpTableName

Type: LPCTSTR

The name of the accelerator table to be loaded. Alternatively, this parameter can specify the resource identifier of an accelerator-table resource in the low-order word and zero in the high-order word. To create this value, use the MAKEINTRESOURCE macro.

Return Value

Type: HACCEL

If the function succeeds, the return value is a handle to the loaded accelerator table.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

Remarks

If the accelerator table has not yet been loaded, the function loads it from the specified executable file.

Accelerator tables loaded from resources are freed automatically when the application terminates.

Examples

For an example, see Creating Accelerators for Font Attributes.

Requirements

   
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

CopyAcceleratorTable

CreateAcceleratorTable

DestroyAcceleratorTable

Keyboard Accelerators

MAKEINTRESOURCE

Reference