TBApiSetRotate API Call

 

Description

Sets the rotation factor for a new display orientation.

Parameters

Degrees of rotation: 0, 90, 180 and 270.

Returns

0 = fail, 1 = OK.

Notes

The driver adjusts calibration based on the rotated setting. However, some or all of the following factors may affect the accuracy of the rotated calibration...

 

·         Touch screen misalignment

·         Controller did not use full range of available values, or the missing part of the range is non-symmetrical.

·         Inaccuracies in the re-sizing of the rotate desktop.

 

If calibration accuracy is an issue with this rotational method then define a Calibration style for each rotation mode, calibrate each style (with the screen rotated in the associated position) and call TBApiSetCalibrationStyle to switch to the new style when the rotation takes place.  This guarantees accurate calibration.

 

Although this call caters for 180 degree rotation in some cases calibration will be correct in this rotation without the need to make this call. Only if the X and Y axis are reversed will this call be required.

 

This call is made by various UPDD utilities that handle desktop rotation to inform the driver when rotation has taken place. Rotation issues are covered separately in the UPDD on-line documentation.

 

Visual C++ Declaration/example

 

BOOL TBAPI TBApiSetRotate(DWORD aRotate);

 

If (!TBApiSetRotate(90))

{

            AfxMessageBox( “Unable to rotate display”);

}

 

Visual Basic Declaration/example

 

Public Declare Function TBApiSetRotate Lib “TBapi” Alias “_DLL_TBApiSetRotate@4” (ByVal aRotate As Long) As Boolean

 

Dim Result as Boolean

Result = TBApiSetRotate( 90 );

If Result = False then

            MsgBox “Unable to rotate display”

End if