WinQueryAccelTable
Appearance
This function queries the window or queue accelerator table.
Syntax
WinQueryAccelTable(hab, hwndFrame)
Parameters
- hab (HAB) - input
- Anchor-block handle.
- hwndFrame (HWND) - input
- Frame-window handle.
- NULLHANDLE: Return queue accelerator.
- Other: Return the window accelerator table, by sending the WM_QUERYACCELTABLE message to hwndFrame.
Returns
- haccelAccel (HACCEL) - returns
- Accelerator-table handle.
- NULLHANDLE: Error occurred
- Other: Accelerator-table handle.
Errors
Possible returns from WinGetLastError
- PMERR_INVALID_HWND (0x1001)
- An invalid window handle was specified.
Remarks
Example Code
This example shows how to get the accelerator table for the frame window.
#define INCL_WINWINDOWMGR
#define INCL_WINACCELERATORS
#include <os2.h>
HACCEL haccel;
HWND hwndFrame, hwndClient; /* window handles. */
HAB hab; /* anchor block. */
hwndFrame = WinQueryWindow(hwndClient,
QW_PARENT); /* get handle of parent, */
/* which is frame window. */
/* Now get the accel table for the frame window */
haccel = WinQueryAccelTable(hab, hwndFrame);
Related Functions
- WinCopyAccelTable
- WinCreateAccelTable
- WinDestroyAccelTable
- WinLoadAccelTable
- WinSetAccelTable
- WinTranslateAccel