Jump to content

WinQueryAccelTable

From EDM2
Revision as of 21:31, 6 August 2023 by Martini (talk | contribs) (Created page with " This function queries the window or queue accelerator table. ==Syntax== WinQueryAccelTable(hab, hwndFrame) ==Parameters== hab (HAB) - input Anchor-block handle. h...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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);

Definition

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

HAB       hab;          /*  Anchor-block handle. */
HWND      hwndFrame;    /*  Frame-window handle. */
HACCEL    haccelAccel;  /*  Accelerator-table handle. */

haccelAccel = WinQueryAccelTable(hab, hwndFrame);

Related Functions

Related Messages

  • WM_QUERYACCELTABLE