Click to See Complete Forum and Search --> : how can I change the title bar color?


Danielle Harvey
April 23rd, 1999, 08:44 AM
All of my programs have, by default, a blue colored title bar at the top of the SDI/MDI area and at the top of each dialog box. How can I change that color to say green or purple? I have visual c++ 6.0.

Any response any one can give me will be greatly appreciated.

delbert Harry
April 23rd, 1999, 11:06 AM
Goto the section on dialog toolbars, and there you will see how he creates a title for the dialog box window. I am not sure if it will work but I think you may be able to get the window rect and then using the system metrics to get the size of only the caption bar and use the ondraw to draw the caption bar as you want it. Try it and let me know how it goes.

Gomez Addams
April 25th, 1999, 12:19 PM
This is a user preference setting. To display a different color you need to handle
WM_NCPAINT. There are articles on this site about gradient shaded caption bars
that show how to do this.