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.