GetDocImageIntensity methods

Method:
short GetDocImageIntensity(
VARIANT * pIntensity,
VARIANT *pChangeable )
Parameters
pIntensity
Points to a variable to receive the current document image intensity. This will be one of the intensity values, such as ARS_OLE_INTENSITY_NORMAL, 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 image intensity can be changed. On return, this variable contains a nonzero value if the intensity is changeable; otherwise, zero. On return, this variable is set to type VT_I2.
Description
The current document image intensity and a changeability indicator are returned.
Return Value
Refer to return codes.
See Also
SetDocImageIntensity method

C/C + +

The following example retrieves the current document image intensity and disables a menu item if the intensity cannot be changed.
 CArsOle * pArsCtrl;
 CMenu * pSubMenu;
 short rc, image_intensity;
 VARIANT current_intensity, changeable;

   .
   .

 rc = pArsCtrl->GetDocImageIntensity( &current_intensity, &changeable );
 if ( rc != ARS_OLE_RC_SUCCESS )
   ERROR;

 image_intensity = current_intensity.iVal;

 pSubMenu->EnableMenuItem(
             ID_VIEW_IMAGE_INTENSITY,
             MF_BYCOMMAND | ( changeable.iVal ? MF_ENABLED : MF_GRAYED ) );
   .
   .

Visual Basic

Dim rc As Integer
Dim current_intensity, changeable As Variant

 .
 .

rc = ArsOle.GetDocImageIntensity (current_intensity, changeable)
If rc <> ARS_OLE_RC_SUCCESS Then
   MsgBox "ERROR"
   End
End If

If changeable <> 0 Then
   menuImageIntensity.Enabled = True
Else
   menuImageIntensity.Enabled = False
End If

 .
 .