Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic


Sets the text color to the specified color.

virtual COLORREF SetTextColor( 
   COLORREF crColor  

Specifies the color of the text as an RGB color value.

An RGB value for the previous text color.

The system will use this text color when writing text to this device context and also when converting bitmaps between color and monochrome device contexts.

If the device cannot represent the specified color, the system sets the text color to the nearest physical color. The background color for a character is specified by the SetBkColor and SetBkMode member functions.

See the example for CWnd::OnCtlColor.

Header: afxwin.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.