Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

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

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 IInkDrawingAttributesobject.

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 Colorparameter 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 Colorproperty. 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 Colorproperty 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::SupportHighContrastInkproperty.

To effectively enable High Contrast mode, you must set the ink overlay's IInkOverlay::AutoRedrawproperty 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 AutoRedrawproperty 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