RGB->HBRUSH help

This is a discussion on RGB->HBRUSH help within the Windows Programming forums, part of the Platform Specific Boards category; hey i have a slight anoyance at present im trying to fill a Device Context with a RGB value say ...

  1. #1
    Registered User MicroFiend's Avatar
    Join Date
    Nov 2002
    Posts
    80

    Angry RGB->HBRUSH help

    hey i have a slight anoyance at present im trying to fill a Device Context with a RGB value say RGB(VAR1,VAR2,VAR3); im using the API call FillRect(hDC,RECT,HBRUSH); but i need either:
    1) a way of obtaining a valid hbrushy value for a RGB value
    or
    2) a function that fills a hdc with an rgb value

    Any help would be great thanx

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    HBRUSH CreateSolidBrush(COLORREF);
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL: Pixel addition
    By Hunter2 in forum Game Programming
    Replies: 4
    Last Post: 12-15-2008, 02:36 PM
  2. RGB Colours
    By rogster001 in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 04-22-2008, 01:56 PM
  3. Stopwatch program (need help!)
    By modnar in forum C Programming
    Replies: 9
    Last Post: 03-22-2004, 12:42 AM
  4. DirectDraw RGB in 32 bpp modes
    By Stan100 in forum Game Programming
    Replies: 12
    Last Post: 09-24-2003, 01:02 AM
  5. Background color in RGB
    By bennyandthejets in forum Windows Programming
    Replies: 16
    Last Post: 06-20-2003, 06:29 AM

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