Make font background transparent

F

Frank

I do the following to pick a font.

Each letter this creates is displayed in a small solid colored rectangle.

Instead, I'd like the background image to show around the letters

Is there an easy change that would make the area around the letters
transparent.



Thanks



SavedTextColor=SetTextColor(hdcPaint, TextColor);

SavedBkColor=SetBkColor(hdcPaint,HighlightColor);

memset(&lfLogicalFont, 0, sizeof(LOGFONT));

lstrcpy(lfLogicalFont.lfFaceName, "Courier New");

lfLogicalFont.lfHeight=long(ZoomFactor*cyClient/30);

hFont=CreateFontIndirect(&lfLogicalFont);

hFontOld = SelectFont(hdcPaint, hFont);
 
D

David Lowndes

I do the following to pick a font.
Each letter this creates is displayed in a small solid colored rectangle.
Instead, I'd like the background image to show around the letters
Is there an easy change that would make the area around the letters
transparent.

Have a look at the SetBkMode API - TRANSPARENT.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top