Dave's Brain

Browse - Programming Tips - How can I set the background color to the same background used in dialogs.

Date: 2010apr12
Language: C/C++
OS: Windows

Q.  How can I set the background color to the same background used in dialogs.

A.  Its bad to use a hardcoded value because, among other reasons,
its different in different versions of Windows.  So do it like this:

SetBkColor(hDC, GetSysColor(COLOR_MENU));

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.