| Herd Software Development
|=
DaVinci Graphics Library
|==
DaVinci Documentation Home Search Order


Leonardo: Function TWAINSetRect

Sets the scan area used when next time calling TWAINAquireExt.

BOOL FAR PASCAL TWAINSetRect (
HTWAINACCESS hta,
LPRECT lpRect,
DWORD dwReserved);
hta Handle to TWAIN memory created by TWAINInitialize
lpRect Defines the scan area to be scanned in the next call to TWAINAquireExt. The specifications are in TWIPS, (twentieth points) = 1 / 1440 inches = approx. 0,017638888 millimeters.

The origin of the coordinate system is in the upper left corner i.e. the value of right is numerically bigger than left, bottom is numerically bigger than top.

dwReserved Reserved for future use. Applications always specify 0.

Returned value:

The returned value is TRUE if setting the scan area was successful. It is FALSE in case of an error.

Comment

The data source needs to be opened to set the scan area and therefore, the data source manager is necessarily also opened. An error can occur if the data source does not support setting the scan area or if opening the data source failed.

Þ problems with TWAIN - implementations

Þ function TWAINAquireExt

Þ function TWAINSetResolution

Þ function TWAINCallDS

Þ function TWAINIsDSMOpen