WNDCLASS wc;
...
wc.hbrBackground = (HBRUSH)GetStockObject(COLOR_WINDOW+1);
I could not undestand what is +1
for and what is HBRUSH
?
Don't you mean?
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
GetStockObject gets one of the stock brushes, pens, fonts or palettes. You should not be using COLOR_WINDOW with it.
Use one of the stock brushes with it, so for a white background you could use...
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
Whatever works, use it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With