Thread: Title bar background?

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Question Title bar background?

    How would I set the color of the title bar to black, and change the Size, Close, and Minimize buttons to purple?
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: [email protected]

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  2. #2
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    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
    1978 Silver Anniversary Corvette

  3. #3
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Lightbulb Well, I have..

    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.
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: [email protected]

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  4. #4
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    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.
    zen

  5. #5
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    Posts
    133
    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.
    C++ Is Powerful
    I use C++
    There fore I am Powerful

  6. #6
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    >>> 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
    1978 Silver Anniversary Corvette

  7. #7
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    if you trap the WM_NCPAINT then you can paint on your whole window rather than just the client area.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  8. #8
    Registered User
    Join Date
    Nov 2001
    Posts
    3
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dialog don't show background or title
    By Normac in forum Windows Programming
    Replies: 1
    Last Post: 08-13-2007, 11:58 AM
  2. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  3. Window without title bar
    By maxorator in forum Windows Programming
    Replies: 1
    Last Post: 10-16-2005, 12:26 AM
  4. different title bar buttons
    By w4ck0z in forum Windows Programming
    Replies: 1
    Last Post: 08-09-2004, 04:57 AM
  5. Child window with active (highlighted) title bar: Possible?
    By JasonD in forum Windows Programming
    Replies: 7
    Last Post: 10-16-2003, 06:43 AM