SetScanArea

#include "BiTwain.h"

 

int CALLBACK SetScanArea (LPIMGLAYOUT rect)

Description

This function specifies the scanning area.

Important: Before scanning, if the scanner specific driver user interface is enabled, the driver most likely will overwrite the scan area value set by this function.

The measurement of the area depends on the value of ICAP_UNITS capability. You can get this value with GetUnit function and specify the unit with SetUnit function. In common cases the unit is inch.

typedef struct tagIMGLAYOUT

{

    float    left;

    float    top;

    float    right;

    float    bottom;

} IMGLAYOUT, *LPIMGLAYOUT;

 

Parameters

LPIMGLAYOUT

rect

This parameter is the scanning area.

Return values

Return TW_OK on success or an error code on failure.

Requirements

Header :     Declared in BiTwain.h; include BiTwain.h.

Library :    Use BiTwain.lib.

DLLs :       BiTwain.dll.