Thread: Default Windows Background Color

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    10

    Default Windows Background Color

    I was searching the forums for info on how to set the background the color of the default windows settings (in your display properties) i found COLOR_WINDOW+1 but that just gives me a white background when i use it like this:
    Code:
        wincl.hbrBackground = (HBRUSH) GetStockObject(COLOR_WINDOW+1);
    is that the correct way to use it? did i forget to call something extra? or is it wrong all together?
    thanks....

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Remove the "GetStockObject" part of that line.

    gg

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    10
    so....
    Code:
        wincl.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
    ?????


    still dont work....

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Whatever the problem is, it's not that line of code.

    gg

  5. #5
    Registered User
    Join Date
    Mar 2004
    Posts
    10
    ah-hah! COLOR_3DFACE+1

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Tab control background color
    By maxorator in forum Windows Programming
    Replies: 3
    Last Post: 11-23-2006, 07:44 AM
  2. Changing background color of irregular image
    By Tesita in forum C++ Programming
    Replies: 5
    Last Post: 11-03-2003, 08:17 PM
  3. Tetris Questions
    By KneeGrow in forum Game Programming
    Replies: 19
    Last Post: 10-28-2003, 11:12 PM
  4. Background Colour in Windows API
    By Vicked in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2003, 03:49 AM