Jump to content

WinQueryAccelTable: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
Line 50: Line 50:


==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

Related Messages