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?
[-background, should work with most controls (but not Buttons - see
MSDN). However, class brushes are ignored for such controls - I have a
fix for this.]
(2) Does anyone know or have any opinions on what the behaviour for a
RichEdit control in readonly mode with a given background colour should
be. Current behaviour is that if no -background option is given then
the background is 'white' (COLOR_WINDOW) when read/write and 'grey'
(COLOR_BTNFACE) when readonly. If a -background option is given, then
this colour is used regardless. My view is that this is a reasonable
approach, but I thought I'd ask.
Rob.
- [perl-win32-gui-hackers] -background option and windows Robert May
-