Thread: RGB->HBRUSH help

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

    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
    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
    HBRUSH CreateSolidBrush(COLORREF);
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ

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
    Replies: 28
    Last Post: 04-22-2008, 12: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, 12:02 AM
  5. Background color in RGB
    By bennyandthejets in forum Windows Programming
    Replies: 16
    Last Post: 06-20-2003, 05:29 AM