Altering the Main Application
If using modeless TWAIN processing, the application loop must be altered. Below describes the traditional application loop, the "normal" TWAIN application loop, and the "DTWAIN" application loop.
Here is a normal, application message loop. Example of Traditional Application Message Loop
Normally, a TWAIN enabled application would need to alter the message loop similar to this: Example of TWAIN Application Message Loop Alterations
A DTWAIN application that desires to alter the application's message loop needs only to do this: Example of DTWAIN Application Message Loop Alterations
To specify that the application desires to alter the application loop, the DTWAIN_SetTwainMode must be called before the main application loop starts processing messages. By default, DTWAIN assumes that the application will not alter the application loop; so calling this function is mandatory. |