CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Posts
    120

    Dialog Background Color

    Hi,

    I have a question on how to color the background of a dialog multiple colors.

    Generally, for a single color throughout, I would create a solid brush with the color I desire, then use WM_CTLCOLORDLG to pain the background.

    What I am trying to do however, is have multple colors, a section of purple, then a section of yellow, etc.. (rectangles, squares ... )

    Would anyone know how to go about implementing that (no MFC of course)..

    Thanks

  2. #2
    Join Date
    Nov 2004
    Location
    Pakistan
    Posts
    466

    Re: Dialog Background Color

    You mean drawing something on the dialog ?

    If so then you have to track WM_PAINT event, paint in device context for the dialog. btw function Rectangle is used to create such shapes.

    regards
    » Please 'Rate This Post' if it helped (encourage us to help you more)
    » Build GUI in minute using rad c++
    » Free IDE + GUI code generator - screenshot
    » Free WINAPI sourcecode and tutorials

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured