Changing the background color of window created with CreatewindowEx()
Recently, I wanted to create a window using Win32. That was the first time, i created a window with Win32
I successfully created the Window using CreateWindowEx(..). The visaul appearance is same as MFC Dialog.
Alas !! I faced one simple but serious problem. My Window looks white.

I couldn’t change the background color..
… I tried a lot with the params and styles of CreateWindow(). Ooops..
After that, I just go throgh Win32 documentation..hey one flag is there in the WNDCLASS structure.
xxxx.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_3DFACE);
Now.. just look at my window.. Its pretty good na !!!

Believe only what you see, what you test and judge to be true.
for http://vctipsplusplus.wordpress.com/
BijU
Categories: Visual C++
Recent Comments