#include "ltwrappr.h"
L_INT LTwain::SetImageFrame (pFrame);
pTW_FRAME pFrame; |
pointer to a structure |
Sets the image frame used when transferring images from the current TWAIN source.
Parameter |
Description |
pFrame |
Pointer to a variable that contains the image frame value to set. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
The image frame specifies the size and location of the image to acquire. To obtain the current image frame value, call the LTwain::GetImageFrame function.
Required DLLs and Libraries
LTTWN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
TW_FIX32 FloatToTWFix32 (float Floater){TW_FIX32 Fix32;TW_INT32 Int32 = (TW_INT32)(Floater * 65536.0 + 0.5);Fix32.Whole = (TW_INT16) (Int32 >> 16);Fix32.Frac = (TW_UINT16) (Int32 & 0x0000FFFFL);return Fix32;}L_INT LTwain__SetImageFrameExample(LTwain * plTwain){L_INT nRet = SUCCESS;TW_FRAME frame;nRet = plTwain->GetImageFrame (&frame);if (nRet == SUCCESS){frame.Left = FloatToTWFix32(0);frame.Top = FloatToTWFix32(0);frame.Right = FloatToTWFix32(8.5);frame.Bottom = FloatToTWFix32(11);nRet = plTwain->SetImageFrame(&frame);if(nRet != SUCCESS)return nRet;}elsereturn nRet;return SUCCESS;}