Jump to content

WinQueryAccelTable: Difference between revisions

From EDM2
Created page with " This function queries the window or queue accelerator table. ==Syntax== WinQueryAccelTable(hab, hwndFrame) ==Parameters== hab (HAB) - input Anchor-block handle. h..."
 
Line 6: Line 6:


==Parameters==
==Parameters==
hab (HAB) - input
;hab (HAB) - input
:Anchor-block handle.


    Anchor-block handle.
;hwndFrame (HWND) - input
 
:Frame-window handle.
hwndFrame (HWND) - input
:;NULLHANDLE
 
::Return queue accelerator.  
    Frame-window handle.
:;Other
 
::Return the window accelerator table, by sending the WM_QUERYACCELTABLE message to hwndFrame.
    NULLHANDLE
        Return queue accelerator. Other
        Return the window accelerator table, by sending the WM_QUERYACCELTABLE message to hwndFrame.  


==Returns==
==Returns==

Revision as of 21:31, 6 August 2023

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