GUI Help > Events > postEvent
postEvent
postEvent handle eventSource, int eventType, int eventData, int eventDataEx
Description: postEvent is used to simulate an event happening. Sometimes you may want to "fake" an event or use the event system for non-GUI related purposes. For example, you may have a button that performs the same action as a menu item in your program. When you receive a button-click, you could use postEvent to simulate the menu item click. Events created using postEvent are received in the same way as other events (use getEvent to receive the event, and the other event commands to extract information about it)
Return Value:
Parameters:
eventSource | The source for the simulated event.
eventType | A number specifying the type of event which happened.
eventData | Information about the event.
eventDataEx | Additional information about the simulated event.
Remarks:
See Also:
Example: (Note: You will need to include the GUI constants file for this example to work)