Jump to content

WinDestroyAccelTable

From EDM2
Revision as of 07:24, 7 August 2023 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function destroys an accelerator table.

Syntax

WinDestroyAccelTable(haccelAccel)

Parameters

haccelAccel (HACCEL) - input
Accelerator-table handle.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion
FALSE: Error occurred.

Errors

Possible returns from WinGetLastError

PMERR_INVALID_HACCEL (0x101A)
An invalid accelerator-table handle was specified.

Remarks

Before an application is terminated, it should call the WinDestroyAccelTable function for every accelerator table that is created with the WinCreateAccelTable function.

Example Code

This example destroys an accelerator-table based on the handle returned from either WinCreateAccelTable or WinLoadAccelTable.

#define INCL_WINACCELERATORS    /* Window Accelerator Functions */
#include <os2.h>

HACCEL  hAccel;         /* Accelerator-table handle             */
BOOL  fSuccess;         /* success indicator                    */

fSuccess = WinDestroyAccelTable(hAccel);

Related Functions