[C++/win32] Change text background colour

Started by
1 comment, last by Aardvajk 14 years, 3 months ago
Hello I have a simple win32 application that just paints some text onto a window using TextOut(). But the background of the text is white. How can I change the background colour to gray or some other colour behind the text I paint with TextOut()?
Advertisement
Use the SetBkColor function on the DC you use with TextOut.
Or if you want to preserve the existing colour already on the window, use SetBkMode with the TRANSPARENT argument on the DC.

This topic is closed to new replies.

Advertisement