Window Color

This is a discussion on Window Color within the Windows Programming forums, part of the Platform Specific Boards category; How do u make the window have a background color other than the standard black, white, and gray? I think ...

  1. #1
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136

    Window Color

    How do u make the window have a background color other than the standard black, white, and gray? I think it has to do with regions, but I don't know how to get a color like yellow or something. Yes, I am a beginner and very dumb.

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Create and define an HBRUSH object (with CreateSolidBrush) then use it when you set up your WNDCLASSEX hbrBackground.

    Here's a basic example:
    Code:
    //this is all at the top of your WinMain
    HBRUSH hbYellow=CreateSolidBrush(RGB(255,255,0));
    WNDCLASSEX wcx;
    wcx.hbrBackground=hbYellow;
    //wcx.etc etc etc....

  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Thanx, I'll check it out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 10:06 AM
  3. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21