Gdi32SetTextColor Method

Sets the text color for the specified device context to the specified color.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("GDI32.dll")]
public static uint SetTextColor(
	IntPtr hdc,
	int color
)

Parameters

hdc  IntPtr
A handle to the device context.
color  Int32
The new color for the text.

Return Value

UInt32
If the function succeeds, the return value is a color reference for the previous text color as a COLORREF value.

If the function fails, the return value is CLR_INVALID (-1 or 0xFFFFFFFF).

Remarks

See Also