I have the following code in my Window class creation:
HBRUSH hBrush = (HBRUSH)CreateSolidBrush(RGB(255,0,0));
wndClassEx.hbrBackground = hBrush;
and the Window is created with a red background.
You need to show your actual code, and explain where it fails.