Jump to content

WinDestroyAccelTable

From EDM2
Revision as of 21:25, 6 August 2023 by Martini (talk | contribs) (Created page with " This function destroys an accelerator table. ==Syntax== WinDestroyAccelTable(haccelAccel) ==Parameters== ;haccelAccel (HACCEL) - input :Accelerator-table handle. ==Return...")
(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);

Definition

#define INCL_WINACCELERATORS /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HACCEL    haccelAccel;  /*  Accelerator-table handle. */
BOOL      rc;           /*  Success indicator. */

rc = WinDestroyAccelTable(haccelAccel);

Related Functions