Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

font problem

Status
Not open for further replies.

makys

Programmer
Joined
Dec 20, 2003
Messages
2
Location
YU
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();

-Bones
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top