How would I set the color of the title bar to black, and change the Size, Close, and Minimize buttons to purple?
Printable View
How would I set the color of the title bar to black, and change the Size, Close, and Minimize buttons to purple?
Are you able to do that? I thought that title bar colors are "general" settings. You set them with the properties.
But I could be wrong. I would be interested to see if there is a way to do that.
--Garfield
I have ssen it done, but not with C++. I know it can be done with Visual Basic, though. I was just curious about that.
You could look into SetSysColors(), but I think it may not do exactly what you want, as other windows controls use the system button colour so you'd be changing them aswell.
I have seen the code for that. I found it at google, but I don't remember what I was looking for. I know that it is owner drawn though.
>>> I have ssen it done, but not with C++. I know it can be done with Visual Basic, though. <<<
Anything Visual Basic can do, C/C++ can do 20 times faster, 50 times more efficient, and 100 times more complexly.
--Garfield
if you trap the WM_NCPAINT then you can paint on your whole window rather than just the client area.
The only way I know to change the color and change the buttons would be to create your own. Make a bitmap resource for the buttons and CreateButton. Assign them the normal attributes of the standard buttons like WM_CLOSE. You can also create a small window at the top and color it black for the title bar. I think that's what windows does behind the scenes anyway. It is an indepth workaround though.