GetNumericContainerFIX32Value example for C++ Builder
void __fastcall TForm1::btnGetNumericContainerFIX32ValueClick(TObject *Sender)
{
L_INT nRet;
L_INT nItemType;
TW_FIX32 twFix;
TW_CAPABILITY twCap;
// Fill the TW_CAPABILITY structure with values
twCap.Cap= ICAP_BRIGHTNESS;
twCap.ConType= TWON_ONEVALUE;
nRet= LEADTwain1->GetCapability ( &twCap, LTWAIN_CAPABILITY_GETCURRENT );
if ( nRet != SUCCESS )
{
MessageBox ( Handle, "Failed to get capability", "ERROR", MB_OK );
return;
}
nRet= LEADTwain1->GetNumericContainerItemType ( &twCap, &nItemType );
if ( nRet != SUCCESS )
{
MessageBox ( Handle, "Failed to get capability item type", "ERROR", MB_OK );
}
else
{
if ( nItemType == TWTY_FIX32 )
{
nRet= LEADTwain1->GetNumericContainerFIX32Value ( &twCap, 0, &twFix );
if ( nRet != SUCCESS )
MessageBox ( Handle, "Failed to get capability item value", "ERROR", MB_OK );
}
}
}