From: Jeremy W. <jez...@ho...> - 2005-08-01 08:06:46
|
>I've been looking at a few of the bug reports regarding background colours >of windows/controls. > >(1) It appears that the '-background' option was never intended to work >with windows (Win32::GUI::Window, Win32::GUI::Dialog) and that the only >way to change the background colour of a window is using the -class option >with a coloured brush. It might be possible to extend the WM_PAINT and/or >WM_ERASEBKGND handlers to cope with this - is it work exploring? I've just had a look at the Visual .Net environment and you can specify the backcolor of a window (and the background image) in the Designer - now, how this is achieved under the hood is a different matter:) The problem with using a class to set the background is that you can't change it during runtime. Setting the background of a window does seem to crop up now and again - and I've been stung with it several times - so a solution would be nice - but how much work would be involved with the fiddling of WM_PAINT/WM_ERASEBKGND? Is there a risk of it breaking other things? Performance? Cheers, jez. |