Win32 background colour

wc.lpszClassName = "MyWndClassName";
WNDCLASS wc2 = wc;
WNDCLASS wc3 = wc;
wc2.hbrBackground = blueBrush;
wc2.hCursor = ::LoadCursor(0,IDC_WAIT);
wc3.hbrBackground = randBrush;
// Step 3: Register the WNDCLASS instance with Windows.
RegisterClass( &wc );
RegisterClass( &wc2);
RegisterClass( &wc3);

For some reason I can't change the background colour of two of the windows, I need each to be different colours.


You're registering all three window classes with the same name so you're only ending up with one window class. To keep them separate, you need to give each one a unique name. I've edited the relevant code into the question.

Need Your Help

How to initialize test class resources in Visual Studio Unit Testing framework?

visual-studio unit-testing visual-c++ c++-cli

I'm using the unit testing framework in .NET in C++/CLI to test unmanaged C++ code.

Passing parameters to express node.js via java script

javascript html5 node.js express

I am using javascript,html,nodejs,express and mysql to retrieve values from database and pass it back to html .

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.