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));