WinDestroyAccelTable: Difference between revisions
Appearance
Created page with " This function destroys an accelerator table. ==Syntax== WinDestroyAccelTable(haccelAccel) ==Parameters== ;haccelAccel (HACCEL) - input :Accelerator-table handle. ==Return..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
This function destroys an accelerator table. | |||
This function destroys an accelerator table. | |||
==Syntax== | ==Syntax== | ||
Line 6: | Line 5: | ||
==Parameters== | ==Parameters== | ||
;haccelAccel (HACCEL) - input | ;haccelAccel (HACCEL) - input:Accelerator-table handle. | ||
:Accelerator-table handle. | |||
==Returns== | ==Returns== | ||
;rc (BOOL) - returns | ;rc (BOOL) - returns | ||
:Success indicator. | :Success indicator. | ||
: | ::TRUE: Successful completion | ||
::FALSE: Error occurred. | |||
: | |||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
;PMERR_INVALID_HACCEL (0x101A) | ;PMERR_INVALID_HACCEL (0x101A):An invalid accelerator-table handle was specified. | ||
:An invalid accelerator-table handle was specified. | |||
==Remarks== | ==Remarks== | ||
Before an application is terminated, it should call the WinDestroyAccelTable function for every accelerator table that is created with the WinCreateAccelTable function. | Before an application is terminated, it should call the WinDestroyAccelTable function for every accelerator table that is created with the WinCreateAccelTable function. | ||
==Example Code== | ==Example Code== | ||
This example destroys an accelerator-table based on the handle returned from either WinCreateAccelTable or WinLoadAccelTable. | This example destroys an accelerator-table based on the handle returned from either WinCreateAccelTable or WinLoadAccelTable. | ||
Line 31: | Line 30: | ||
fSuccess = WinDestroyAccelTable(hAccel); | fSuccess = WinDestroyAccelTable(hAccel); | ||
</pre> | </pre> | ||
Latest revision as of 07:24, 7 August 2023
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);