WinQueryAccelTable: Difference between revisions
Appearance
Created page with " This function queries the window or queue accelerator table. ==Syntax== WinQueryAccelTable(hab, hwndFrame) ==Parameters== hab (HAB) - input Anchor-block handle. h..." |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This function queries the window or queue accelerator table. | |||
This function queries the window or queue accelerator table. | |||
==Syntax== | ==Syntax== | ||
Line 6: | Line 5: | ||
==Parameters== | ==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. | |||
hwndFrame (HWND) - input | |||
==Returns== | ==Returns== | ||
;haccelAccel (HACCEL) - returns | ;haccelAccel (HACCEL) - returns:Accelerator-table handle. | ||
:Accelerator-table handle. | ::NULLHANDLE: Error occurred | ||
::Other: Accelerator-table handle. | |||
: | |||
: | |||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
;PMERR_INVALID_HWND (0x1001):An invalid window handle was specified. | |||
==Remarks== | ==Remarks== | ||
Line 39: | Line 26: | ||
#define INCL_WINWINDOWMGR | #define INCL_WINWINDOWMGR | ||
#define INCL_WINACCELERATORS | #define INCL_WINACCELERATORS | ||
#include < | #include <os2.h> | ||
HACCEL haccel; | HACCEL haccel; | ||
Line 52: | Line 39: | ||
/* Now get the accel table for the frame window */ | /* Now get the accel table for the frame window */ | ||
haccel = WinQueryAccelTable(hab, hwndFrame); | haccel = WinQueryAccelTable(hab, hwndFrame); | ||
</pre> | </pre> | ||
Line 74: | Line 48: | ||
* [[WinSetAccelTable]] | * [[WinSetAccelTable]] | ||
* [[WinTranslateAccel]] | * [[WinTranslateAccel]] | ||
==Related Messages== | ==Related Messages== | ||
* WM_QUERYACCELTABLE | * [[WM_QUERYACCELTABLE]] | ||
[[Category:Win]] | [[Category:Win]] |
Latest revision as of 19:29, 14 May 2025
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