Draw your text:
Use the device description of the font, text color and background color to draw text.
Call the CDC :: SetTextColor method to set the text color,
Call CDC :: SetBkcolor and CDC :: SetBkmode method Setup background color.
Want to change the color color in the DC, and make the text background transparent, you can use the following code:
PDC-> CDC :: SetTextColor (RGB (255, 0, 0));
PDC-> CDC :: setBkmode (Transparent);
The most common use of DrawText, Textout and TabbedTextout are DrawText.
DrawText is formatted in a given rectangle.
Textout is to draw a body with the currently selected font and color in the specified location.
TabbedTextOut is a grouped a text in the specified location and extends the tab to the specified location in the tab stop.