Selecting the TWAIN Source

Top  Previous  Next

A TWAIN Source must be selected to acquire an image.  The Source is analogous to the actual device that will ultimately acquire the image.  A TWAIN Source is denoted by the DTWAIN_SOURCE data type.  The Source can be selected either by the user using the TWAIN Select Source dialog box, or programmatically.

 

To select and open a Source, the following functions can be used:

 

DTWAIN_SelectSource

DTWAIN_SelectDefaultSource

DTWAIN_SelectSourceByName



The following functions can be used to select a Source, and optionally open the Source if the source is selected.  Please note that selecting a Source and opening the selected Source are two separate operations: 


DTWAIN_SelectDefaultSourceWithOpen

DTWAIN_SelectSourceByNameWithOpen

DTWAIN_SelectSourceWithOpen



The following functions allows a TWAIN "Select Source" dialog to be displayed with various display options such as positioning of the dialog on the screen, Source names appear sorted, etc.


DTWAIN_SelectSource2