Re: Win32Lib: Button Color
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 13, 2004
- 583 views
Lewis Townsend wrote: > > Derek Parnell wrote: > > This effect happens because the clearWindow call drawns a colored rectangle > > over the button area, but as soon as Windows gets any event for the button > > it redraws the button 'correctly'. > > > > There are two main ways to get colored buttons. > > (1) Define it as an owner-drawn button and handle the special messages > > (meaning: You do all the graphic work, but you're told when and what to > > do). > > > > (2) Simulate a button with a simple child window. You still get to > > do all the graphics, and you must handle all the keyboard and > > mouse events too. > > How about using the on paint event? I tried. Windows redraws the button while its depressed. Your app only gets paint events when it is not depressed. Its all quite depressing really. -- Derek Parnell Melbourne, Australia