Compartilhar via


IInkDrawingAttributes::Color

4/8/2010

Gets or sets the color of the ink that is drawn with this IInkDrawingAttributes object.

Syntax

[propput] HRESULT put_Color ([in] long Color);
[propget] HRESULT get_Color ([out, retval] long *Color
);

Parameters

  • Color
    The color of the ink that is drawn with this IInkDrawingAttributes object.

    The default value is BLACK (RGB(0,0,0)).

    This property is read/write.

Return Value

HRESULT value Description

S_OK

Success.

E_POINTER

The Color parameter is an invalid pointer.

E_INK_EXCEPTION

An exception occurred inside the method.

E_UNEXPECTED

Unexpected parameter or property type.

Remarks

In High Contrast mode, ink always appears with the system color setting (COLOR_WINDOWTEXT), regardless of the setting of the Color property. However, the actual color of the ink is always saved as the set color, or default color (BLACK) if not set. For example, if the Color property is set to RED, a user in High Contrast mode sees the ink in the system color, but a user not in High Contrast mode sees the ink drawn as the set color RED. This functionality allows a user in High Contrast mode to view the ink in the system setting without modifying the actual stroke color.

This means that by default all ink is mapped to one color when in High Contrast mode. To disable this default color–mapping behavior and implement your own, use the ink overlay object's IInkOverlay::SupportHighContrastInk property.

To effectively enable High Contrast mode, you must set the ink overlay's IInkOverlay::AutoRedraw property to TRUE (which means that ink is redrawn when the window is invalidated). Windows Mobile does not support High Contrast mode if you set the AutoRedraw property to FALSE.

For more information about the system color, see GetSysColor. For more information about High Contrast mode, see Enabling High Contrast.

Requirements

Header msinkaut.h
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile 6 Classic and later, Windows Mobile 6 Professional and later

See Also

Concepts

Windows Mobile Ink Reference