- Method
- short GetDocRotation(
- VARIANT * pRotation,
- VARIANT * pChangeable )
- Parameters
- pRotation
- Points to a variable to receive the current document rotation.
This will be one of the rotation values, such as ARS_OLE_ROTATION_0,
found in ARSOLEEX.H. On return, this variable
is set to type VT_I2.
- pChangeable
- Points to a variable to receive an indication of whether the document
rotation can be changed. On return, this variable contains a nonzero
value if the rotation is changeable; otherwise, zero. On return, this
variable is set to type VT_I2.
- Description
- The current document rotation and a changeability indicator are
returned.
- Return Value
- Refer to return codes.
- See Also
- SetDocRotation method
C/C + +
The following example retrieves the
current document rotation and disables a menu item if the rotation
cannot be changed.
CArsOle * pArsCtrl;
CMenu * pSubMenu;
short rc, rotation;
VARIANT current_rotation, changeable;
.
.
rc = pArsCtrl->GetDocRotation( ¤t_rotation, &changeable );
if ( rc != ARS_OLE_RC_SUCCESS )
ERROR;
rotation = current_rotation.iVal;
pSubMenu->EnableMenuItem(
ID_VIEW_ROTATION,
MF_BYCOMMAND | ( changeable.iVal ? MF_ENABLED : MF_GRAYED ) );
.
.
Visual Basic
Dim rc As Integer
Dim rotation, changeable As Variant
.
.
rc = ArsOle.GetDocRotation (rotation, changeable)
If rc <> ARS_OLE_RC_SUCCESS Then
MsgBox "ERROR"
End
End If
If changeable <> 0 Then
menuRotation.Enabled = True
Else
menuRotation.Enabled = False
End If
.
.