I am trying to draw/print a text, but i need a transparent background. I have been trying this:
TextOut(hDC, 50, 50, "MY TEXT", lstrlen("MY TEXT"));
The problem is that this generates an white background.
I have also tried with this:
ExtTextOut(hDC, 50, 50, ETO_OPAQUE, TA_LEFT, "MY TEXT", lstrlen("MY TEXT"), NULL);
ETO_OPAQUE – sets the background color on the text area to the current background color of the program. But if my background is dynamic and changes, this would not work, and that’s why i need a transparent background.
For more information on these 2 functions http://msdn.microsoft.com/en-us/library/dd144821(v=vs.85)
I know i could insert the text into an bitmap and use “TransparentBlt” to achieve the “same” effect, but… Anyone who knows another function to draw / print text with transparent background, or any ideas on how i could solve this so called problem?
Thanks… =)
1 Answer