Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>translateaccelerator()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
TranslateAccelerator()
Try to translate a keyboard message as an accelerator
------------------------------------------------------------------------------

Syntax
#include "msg.ch"
TranslateAccelerator( <hWnd>, <hAccel>, <aMsg> )   -->   nRet

Arguments
<hWnd> specifies the window the message might be for.

<hAccel> specifies the handle of an accelerator table.

<aMsg> is the array containing the message.  It must be at
least MSG_LENGTH in length, and must have been returned by
GetMessage() or PeekMessage().

Returns
A non-zero numeric value is returned if the message is handled
as an accelerator.

Description
This function allows Clip-4-Win applications to be programmed
in the "traditional" manner of Windows applications, if you
wish.  It provides special handling of certain messages, such
as TAB and Down Arrow, the way modal dialogs do.  If you have
several windows and accelerator tables, you may want to call
this function more than once.

Clip-4-Win calls this function automatically during ChkEvent()
for an accelerator table enabled by SetAccelerator() or USE
ACCELERATORS.

Example
#include "msg.ch"
local     aMsg[MSG_LENGTH]
do while GetMessage( aMsg )
     if TranslateAccelerator( hWnd, hAccel, aMsg ) == 0
          TranslateMessage( aMsg )
          DispatchMessage( aMsg )
     endif
enddo

See Also: DispatchMessage() GetMessage() SendMessage() TranslateMessage()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson