Board index » cppbuilder » background color
JVines
CBuilder Developer |
JVines
CBuilder Developer |
background color2006-07-18 04:03:12 AM cppbuilder33 Please explain: when I use FillRect, the background color for the brush pattern is always black, not clear, like it is when I use just about any other drawing method. The lines in the patterns are as they should be. |
JD
CBuilder Developer |
2006-07-18 05:21:52 AM
Re:background color
JVines < XXXX@XXXXX.COM >wrote:
Quote
Font::Color. If that doesn't solve your problem, please explain what it is that you're trying to accomplish. ~ JD |
Rudy Velthuis [TeamB]
CBuilder Developer |
2006-07-18 07:32:40 AM
Re:background color
At 23:21:52, 17.07.2006, JD wrote:
Quote
void __fastcall TForm1::PaintBox1Paint(TObject *Sender) { PaintBox1->Canvas->Brush->Color = clBlue; PaintBox1->Canvas->Font->Color = clGreen; PaintBox1->Canvas->Pen->Color = clRed; PaintBox1->Canvas->Brush->Style = bsDiagCross; PaintBox1->Canvas->FillRect(PaintBox1->ClientRect); } You'll see a black background with a blue cross pattern, and not a green pattern on a blue background (which is what the OP seems to want to achieve). -- Rudy Velthuis [TeamB] rvelthuis.de/ "There is a charm about the forbidden that makes it unspeakably diserable." -- Mark Twain. {smallsort} |
JD
CBuilder Developer |
2006-07-18 09:59:17 AM
Re:background color
"Rudy Velthuis [TeamB]" < XXXX@XXXXX.COM >wrote:
Quote
withstanding). ~ JD |
JVines
CBuilder Developer |
2006-07-18 11:52:17 AM
Re:background color
What I would like to know is why FillRect produces a black background
while all the other methods produce a transparent background. Sure, to produce the same effect, just set Pen to psClear and Rect will accomplish the same thing. I would just like to know why FillRect does what it does. |
Popla
CBuilder Developer |
2006-12-15 12:44:06 PM
Re:background color
Is it possible to change the background color of toolbars,
menu and frame of the main application. SetSysColors has too much impact. It affects other applications as well. WM_CTLCOLORDLG has not enough impact. It affects only one dialog. Something in between. Thnks |
Ed Mulroy
CBuilder Developer |
2006-12-16 10:40:18 PM
Re:background color
You could subclass the window procedure for the windows in question and
handle the non-client background painting yourself. . Ed QuotePopla wrote in message |