|
-
Jul 8th, 2002, 12:06 AM
#1
Colored Text...
How would I go about printing colored text with the DrawText function?
-
Jul 8th, 2002, 12:08 AM
#2
PowerPoster
You'll have to first set the colour of the text using "SetTextColor".
Example:
PHP Code:
SetTextColor(myhdc, RGB(0,255,0));
//DrawText....
-
Jul 8th, 2002, 12:09 AM
#3
Wow you're quick...thanks
-
Jul 8th, 2002, 12:11 AM
#4
Now...how can I change the background color of a window?
-
Jul 8th, 2002, 12:17 AM
#5
PowerPoster
I think "SetBackColor" will work.
Example:
PHP Code:
SetBackColor(winhdc, RGB(0,0,255));
PS: You can always look up at MSDN for reference on API.
-
Jul 8th, 2002, 12:20 AM
#6
Thanks, and thanks for pointing MSDN out to me, lol.
-
Jul 8th, 2002, 12:21 AM
#7
D:\Program Files\Microsoft Visual Studio\MyProjects\w32paint\w32paint.cpp(168) : error C2065: 'SetBackColor' : undeclared identifier
-
Jul 8th, 2002, 12:28 AM
#8
PowerPoster
-
Jul 8th, 2002, 12:32 AM
#9
This makes the background what I choose only on the local RECT that I define. How can I make it so that it changes the BG for the entire window?
-
Jul 8th, 2002, 03:01 AM
#10
PowerPoster
You'll have to first get the handle of your whole window using either "GetDC" or "GetWindowDC".
-
Jul 10th, 2002, 07:54 PM
#11
When creating the window class you can set the background brush.
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.
-
Jul 11th, 2002, 09:46 AM
#12
Fanatic Member
Code:
WNDCLASSEX wnd;
wnd.hbrBackground=(HBRUSH)(COLOR_WINDOW+1);

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Jul 13th, 2002, 09:03 PM
#13
Or:
wc.hbrBackground = CreateSolidBrush(RGB(0, 255, 127));
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.
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
|