A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z



SetTextColor

The SetTextColor function sets the text color for the specified device context to the specified color.

VB4-32,5,6
Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long

Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later

Library
Gdi32

Parameter Information
- hdc
[in] Handle to the device context.

- crColor
[in] Specifies the color of the text.

Return Values
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.

Last update: 07 April 2006