GetDocImageColor method
The current document image color and a changeability indicator are returned.
- Method
- short GetDocImageColor(
- Parameters
- pColor
- Points to a variable to receive the current document image color. This will be one of the color values, such as ARS_OLE_COLOR_BLACK, 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 color can be changed. On return, this variable contains a nonzero value if the color is changeable; otherwise, zero. On return, this variable is set to type VT_I2.
- Description
- The current document image color and a changeability indicator are returned.
- Return Value
- Refer to return codes.
- See Also
- SetDocImageColor method
C/C + +
The following example retrieves the current document image color and disables a menu item if the color cannot be changed. CArsOle * pArsCtrl;
CMenu * pSubMenu;
short rc, image_color;
VARIANT current_color, changeable;
.
.
rc = pArsCtrl->GetDocImageColor( ¤t_color, &changeable );
if ( rc != ARS_OLE_RC_SUCCESS )
ERROR;
image_color = current_color.iVal;
pSubMenu->EnableMenuItem(
ID_VIEW_IMAGE_COLOR,
MF_BYCOMMAND | ( changeable.iVal ? MF_ENABLED : MF_GRAYED ) );
.
.
Visual Basic
Dim rc As Integer
Dim current_color, changeable As Variant
.
.
rc = ArsOle.GetDocImageColor (current_color, changeable)
If rc <> ARS_OLE_RC_SUCCESS Then
MsgBox "ERROR"
End
End If
If changeable <> 0 Then
menuImageColor.Enabled = True
Else
menuImageColor.Enabled = False
End If
.
.