Function NextAppEvent() Foundation
Retrieves the next event without removing it from the event queue.
NextAppEvent( [@mp1], [@mp2], [@oXbp] ) --> nEvent
The return value of NextAppEvent() is a numeric code identifying the event which will be removed next from the queue. Generally, these are events generated by keyboard or mouse activity. The #include file Appevent.ch contains #define constants for the integer numeric event codes.
The function NextAppEvent() returns the next pending event code found in the event queue. If the optional parameters <mp1>, <mp2>, and <oXbp> are included, they are filled with the values of the message parameters and the corresponding Xbase Part associated with the event. The parameters have the same meaning and contain the same values as those returned by a call to the function AppEvent() (see AppEvent()). NextAppEvent() differs from AppEvent() in that NextAppEvent() does not remove the event from the event queue.
// The example shows one way in which multiple events
// signaling mouse movement, can be filtered so
// that only the last event is displayed.
#include "Appevent.ch"
PROCEDURE Main
LOCAL nEvent, mp1, mp2, oXbp
CLS
SetMouse(.T.)
DO WHILE nEvent <> xbeK_ESC
nEvent := AppEvent( @mp1, @mp2, @oXbp, 0 )
IF NextAppEvent() == xbeM_Motion
LOOP
ENDIF
? nEvent
ENDDO
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.