|
-
Dec 15th, 2001, 02:25 AM
#1
Thread Starter
Addicted Member
DrawText
Hello,
I loaded a bitmap into my window. Now I want to draw text on that image, but there is a white rectangle where my text is written. Is there a way to just draw letters whitout the white rectangle? If no, how can I change the color of the white rectangle? I'm using DrawTextEx to draw my text but anyother function should do.
-
Dec 15th, 2001, 07:57 AM
#2
There is some way to set the text background to transparent, but I forgot how.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 15th, 2001, 11:43 AM
#3
Thread Starter
Addicted Member
Ok that's right I discovered how to do it. Just had to SetBkMode to transparent... But now I would like to know how I could change the size of the text I draw.
-
Dec 15th, 2001, 01:23 PM
#4
Member
Just use CreateFont to make the font. This function will return the font which you then select into a DC.
Example:
PHP Code:
HFONT hFont = CreateFont(30, 15, 0, 0, FW_BOLD, 0, 0, 0, ANSI_CHARSET,
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH | FF_ROMAN, "Arial" );
SelectObject(SomeDC, hFont);
You can use SetTextColor to change the font color too.
Chilibean
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|