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>chkevent()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ChkEvent()
Check for a new event
------------------------------------------------------------------------------

Syntax
ChkEvent( [ <ahWnd> ] )   -->   nEvent

Arguments
<ahWnd> optionally specifies an array of handles of windows
that are to be treated like dialogs, using IsDialogMessage()
during the internal processing of ChkEvent().  This allows
TAB/BACKTAB (shift-TAB) to move between child controls and
allows accelerators.  See button.prg.

Returns
An integer corresponding to the EVENT_* values defined in
WINDOWS.CH.

Description
This function is used to find out whether an event has
occurred, and if so to remove it from the event queue.  An
application should call this function reasonably often, and
certainly any time it has nothing else it needs to be doing.
Failing to call it often enough may interfere with multi-
tasking under Windows.

The related function Event() can be used to find the most
recent event that occurred.

The source code to this function is provided in CHKEVENT.PRG.

Example
do while ( ev := ChkEvent() ) == EVENT_NONE
enddo
do case
case ev == EVENT_WINSIZE
     // window resized
     newmaxrow = maxrow()
     newmaxcol = maxcol()
case ev == EVENT_KEY
     key = inkey()
// . . .
endcase


See Also: Event()

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