When I use CDC::TextOut() function to show some text on colored background this function
shows white background around letters. Is there any way to avoid this appearance.
Yes there is. Before painting the text you will want to change the BkMode to TRANSPARENT so no matter what color the text background is it will be invisible.
CClientDC dc(this);
dc.SetBkMode(TRANSPARENT);
// dc.SetBkMode(OPAQUE); this will make it opaque again
dc.TextOut(10,10,"Hi Makys"
Invalidate();
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.