Setting the bkgrnd color of a control
- Posted by Chris Bensler <bensler at mail.com> Apr 25, 2002
- 440 views
Can someone please give me an example of setting the background color of controls, using low level win32? I want to change the color of my mle's and various other controls. I've looked at win32lib, and it uses SetClassLong(hwnd, GCL_HBRBACKGROUND, hbrush) and repaints the window, but I guess I'm missing some details, because I can't get it to work. I've looked into the win32 SDK, and WM_CTLCOLOREDIT supposedly does what I want, by returning the new bk brush from the event handler. But I haven't been successful. Chris