DTWAIN Notifications
During image acquisition, DTWAIN can inform your application of the progress of the acquisition by sending a message as well as a notification code. In addition, an application can change aspects of the acquired image and other attributes (for example, change the file name to save the image to) during image acquisitions by using notifications sent to your application.
The messages and notifications can be sent to your application's DTWAIN message window (the message window is the window specified in the HWND parameter of the DTWAIN_StartTwainSession function) or by using a callback function.
By default, DTWAIN assumes that notifications are turned off. To turn on DTWAIN notifications, a call to DTWAIN_EnableMsgNotify must be issued with TRUE as the argument. If this function is not called, or if DTWAIN_EnableMsgNotify is called with a FALSE argument, no notifications are sent.
Once you have determined that the message has been sent by DTWAIN, you will need to know exactly what DTWAIN is informing your application of. To get the notification, the notification code is always passed as the 'WPARAM' value of the DTWAIN message. The current Source is always sent as the LPARAM value.
For a list of notifications and what each means, see DTWAIN Notification Codes.
|