window coloring

This is a discussion on window coloring within the Windows Programming forums, part of the Platform Specific Boards category; hello, i changed the background color of my window for my app from white to black by changing, wcex.hbrBackground = ...

  1. #1
    Labelizm
    Guest

    window coloring

    hello, i changed the background color of my window for my app from white to black by changing,
    wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
    to
    wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+2);
    which gives it black background and black text with a white highlight, what i want to do now is get rid of the highlight and make the text bright green, however i couldnt fine any lines pertaining to string color.... =/

    so if some one has done this before please let me know.

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    You need to get a handle to the device context for the window and then SetTextColor(HDC, COLORREF).

    good luck
    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

  3. #3
    Labelizm
    Guest
    THANK YOU, works like a charm!

  4. #4
    Labelizm
    Guest

    bg color

    k i got my text green with SetTextColor(hdc, 0x0000FF00);

    but the background on it is white still, i looked at MSDN and found, SetTextBkColor( COLORREF cr ); so i used, setTextBackgroundColor( Color 0x00000000); but, setTextBackgroundColor(); comes up as an undeclared identifier, but MSDN didnt say what header to use with it =/

  5. #5
    Labelizm
    Guest
    Never mind on that, i got it by using
    SetBkMode(hdc, TRANSPARENT);
    just gotta love how MSDN has about 80 listings that do basically the same thing =)
    =)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 09:23 AM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM

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