Thanks Rob, as usual, you have the answer! That was exactly what I was looking for. It is going to make me rethink Win32::GUI::Skin a bit, but I think that it will be for the better. It's early enough in the development process this rethink things. There have been about 70 downloads of Win32::GUI::Skin since I posted it on Sourceforge, but since I've received no feedback, I feel free to make any changes that I want, without looking for user feedback.
BTW, I haven't tried yet, but do you know how using WS_CLICKCHILDREN works with other controls? (Like the caption of a checkbox, does the caption show with the bitmap as the background, or is the window background show?) I definitely need to play with this lots more (as soon as I finish up with taking care of the horses tonight :-) If anyone else reading this has tried Win32::GUI::Skin, please let me know what you think of it! Brian Millham This message traveled at least 44,000 miles to reach you! Creator of the DW6000 Monitor http://www.millham.net/dw6000 [EMAIL PROTECTED] -----Original Message----- From: Robert May [mailto:[EMAIL PROTECTED] Sent: Saturday, October 21, 2006 7:14 PM To: Brian Millham Cc: perl-win32-gui-users@lists.sourceforge.net Subject: Re: [win32-gui] [perl-win32-gui-users] Displaying a button on a DC Brian Millham wrote: > I'm working on adding button support to Skin.pm. My question is how to draw > a button on the DC, without it being overwritten by whatever is drawn on the > DC. > > For a good example, try the sample Draw.pl included with Win32::GUI, and add > a button to the window. > > The button will eventually be hidden by the patterns drawn. > > The only way that I've found around this is to Hide the button, draw on the > DC, and then Show the button. This may work OK for a few buttons, but I > think that it would be inefficient for lots of buttons (and the buttons seem > to flicker) > > Anyone know of a better way? I'm going to experiment with regions (and clip > regions) to see if that may work. Set the WS_CLIPCHILDREN style on the parent window: my $win = Win32::GUI::Window->new( ... -addstyle => WS_CLIPCHILDREN, ); This enforces that the parent cannot draw on it's children - they are automatically clipped from the parent's DC. Regards, Rob. --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0642-5, 10/20/2006 Tested on: 10/21/2006 8:12:29 PM avast! is copyright (c) 2000-2006 ALWIL Software. http://www.avast.com