Dave's Brain

Browse - programming tips - win32 set background to grey correctly

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));
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, 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.