use strict;
use Win32::GUI;
use constant WM_NCHITTEST => 0x0084;
use constant HTCAPTION => 2;
my $window = Win32::GUI::Window->new(
-name => 'window1',
-text => 'Window 1',
-width => 800, -height => 600,
-dialogui => 1,
);
my $text = $window->AddTextfield(
-name => 'text1',
-text => 'Text 1',
-frame => 1,
-left =>10, -top => 10,
-width => 100, -height => 30,
);
$text->Hook(WM_NCHITTEST,sub { $_[0]->Result(HTCAPTION);0;});
$window->Show();
my $DC = $window->GetDC();
for (my $x=10; $x < $window->{-width}; $x += 10)
{
for (my $y=20; $y < $window->{-height}; $y += 20)
{
$DC->SetPixel($x,$y);
}
}
Win32::GUI::Dialog;
exit(0);
The loop where I create the grid pattern is quite slow ( I can actually see it drawing the dots across the screen ). There must be some way to create a mask that I can apply to the background instead of manually drawing each dot. How to do it?
Also, the background gets destroyed when the control is moved around the window. How do I fix this?
Thanks,
Chris
_______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
