473,394 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Make font background transparent

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);
Feb 6 '07 #1
2 2542
>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
Feb 7 '07 #2
thanks, I'll look

"David Lowndes" <Da****@example.invalidwrote in message
news:5k********************************@4ax.com...
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

Feb 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Paul Schnitter | last post by:
Update: My custom control is based on the article "Creating Visual Basic .NET controls from scratch" in "Adventures in .NET" on MSDN. It is designed to be a replacement for the VB6 shape...
2
by: zwylle | last post by:
Hi all, to avoid a nervous breakdown I finally decided to seek help :D I have a table defined with plain color background and in some cells I show pictures to frame my site. The problem I...
1
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i...
8
by: Susan Bricker | last post by:
Is there a way to change the background color of command buttons? I know that I saw some VBA code somewhere that showed how to do this. I think it involved making the button transparent and then...
3
by: Ignacio Domínguez | last post by:
Hi there. I know I can make a form transparent by setting the transparent color, opacity, etc. Is there a way of making the background of a label and the background of a picturebox transparent...
2
by: Kalvin | last post by:
I keep getting my string inside a black box with this code. I would like to make the background transparent. Any help on this will be appreciated very much. '**** BEGIN CODE **** Try Dim...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
0
by: benfly08 | last post by:
Hi, guys. I'm developing a web application for Sales Department people in my company. I used my 1024X768 resolution and "Medium" IE text size to test my Layout and it worked fine. However, some...
5
by: Rudi Hausmann | last post by:
Hi! I want to "paint" some blocks with text in it. As the box can overlap I want the text to be transparent using opacity. Though, the text shall stay well visible. Here is what I produced so...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.