Results 1 to 2 of 2

Thread: Changing color of a dialog box

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    Québec, Canada
    Posts
    131

    Changing color of a dialog box

    Hello,
    I would like to know how I could change the back color of a dialog box? Thanks for any help.
    Khavoerm Irithyl

  2. #2
    amac
    Guest
    Handle the WM_CTLCOLOR message and return a handle to a brush of the color you want the dialog.


    So for the message you could just do


    Code:
    return( CreateSolidBrush( RGB( 86, 154, 169 ) );

    Which would change it to a greenish blue color... That is the one way to do it in MFC.


    I guess using the API you might handle WM_CTLCOLORDLG and modify the brush on the current DC and then pass it along to the default window procedure. That would be my guess... Never actually did this one before.

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