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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the color of a brush.

Status
Not open for further replies.

ClassicThunder

Programmer
Nov 13, 2006
1
US
Hey I'm pretty new to C++ and these forums but I've been playing around with the Window Form Apps making a small text editor.

Anyways I've gotten the text in my textbox to change color but I can't get the color to change when I print. Below is the line that controls the graphics in my print handlers.

Code:
pe->Graphics->DrawString(line, TextFont, /*Need to change color*/ Brushes::Black, leftMargin, yPos, new StringFormat());

I've been trying to find a way to make change this bit of code "Brushes::Black" so that I can just plug my global font color variable in.

Thanks for any help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top