All products / Saraff.Twain.DS / Contents
OnProcessEvent
This operation supports the distribution of events from the application to Sources so that the Source can maintain its user interface and return messages to the application. Once the application has enabled the Source, it must immediately begin sending to the Source all events that enter the application’s main event loop. This allows the Source to update its user interface in real-time and to return messages to the application which cause state transitions. Even if the application overrides the Source’s user interface, it must forward all events once the Source has been enabled. The Source will tell the application whether or not each event belongs to the Source.
The Source should be structured such that identification of the event’s “owner” is handled before doing anything else. Further, the Source should return immediately if the Source isn’t the owner. This convention should minimize performance concerns for the application (remember, these events are only sent while a Source is enabled—that is, just before and just after the transfer is taking place).
Syntax
protected virtual bool OnProcessEvent(Message msg)
Parameters
- msg: The Message of the operation triplet.
Return Value
true if a source consumed event–application should not process it; false if Event belongs to application - process as usual.