Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinTranslateAccel (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINACCELERATORS
BOOL WinTranslateAccel(hab, hwnd, haccel, pqmsg)
HAB hab; /* handle of the anchor block */
HWND hwnd; /* handle of the window */
HACCEL haccel; /* handle of the accelerator table */
PQMSG pqmsg; /* address of structure with message */
The WinTranslateAccel function translates a WM_CHAR message. If it is a
WM_CHAR message in the specified accelerator table, WinTranslateAccel
translates the message pointed to by the pqmsg parameter. The message is
translated into a WM_COMMAND, WM_SYSCOMMAND, or WM_HELP message.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hab Identifies the anchor block.
hwnd Identifies the destination window. Normally, this parameter
identifies a frame window.
haccel Identifies the accelerator table.
pqmsg Points to a QMSG structure that contains the message to be
translated.
Return Value
The return value is TRUE if the function is successful──that is, if the
message matches an accelerator in the table. Otherwise, it is FALSE,
indicating that an error occurred.
Comments
It is possible to have accelerators that do not correspond to items in a
menu. If the command value does not match any items in the menu, the message
is still translated.
Generally, applications do not have to call this function. It is normally
called automatically by WinGetMsg and WinPeekMsg when a WM_CHAR message is
received, with the window handle of the active window as the first
parameter. The standard frame window procedure always passes WM_COMMAND
messages to the FID_CLIENT window. Since the message is physically changed
by WinTranslateAccel, applications will not receive the WM_CHAR messages
that resulted in WM_COMMAND, WM_SYSCOMMAND, or WM_HELP messages.
See Also
WinGetMsg, WinPeekMsg, QMSG, WM_TRANSLATEACCEL
♦