DTWAIN Device Event Notifications

Top  Previous  Next

The following notification is sent to the DTWAIN application window if a Source can send device events to the application:

DTWAIN_TN_DEVICEEVENT

 

When a Source sends a device event, the message is always equal to the value of DTWAIN_GetRegisteredMsg.  The WPARAM is DTWAIN_TN_DEVICEEVENT, and the LPARAM is the DTWAIN_SOURCE that sent the event.

 

To get the actual event, the application must call DTWAIN_GetDeviceEvent with the Source that sent the event.  Note that the DTWAIN_TN_DEVICEEVENT notification can be sent anytime that the Source is opened, and not just when the Source is acquiring an image.

 

For more information on capturing special device events, see Capturing Source Device Events.