Has anyone successfully used the PyCWnd.OnCtlColor
virtual function to change the appearance of a
control?
The program below tries to use it to set the colour
of the text in a PyCButton. My OnCtlColor method gets
called, but it doesn't have any effect on the appearance
of the button.
Also, if I
Roger Upole wrote:
OnCtlColor is expected to return a GDI handle rather than a full
MFC object.
Ah, okay. It does say so, now that I come to look at
the docs carefully enough. It works fine now.
Thanks,
Greg
___
python-win32 mailing list
Well, it *almost* works now... it's okay for all the
button styles except BS_PUSHBUTTON.
My OnCtlColor is still getting called, but the
pushbutton seems to ignore the results. All the other
button styles are okay.
Am I still doing something wrong, or is this a known
limitation of pushbuttons?
According to this discussion
http://forums.devx.com/archive/index.php/t-81725.html
the only way to change a pushbutton's colour is to draw
it yourself.
Roger
___
python-win32 mailing list
python-win32@python.org