a little sample for the new Win32::GUI::Graphic
class.

the basics of this class is this simple: it 
has a Paint event that gets called whenever
the graphic needs to be repainted (eg. when
you move another window over it, when you
minimize it, etc.). this event gets the DC
of the Graphic object as its input parameter,
so you can directly draw into it.
you must just pay attention to call Validate()
before leaving the event, otherwise it will be
called continuously (which could be not bad for 
animation effects, BTW :-)

also, be aware that the control has it own size!
(see the Resize event); I hate to admit it, but
this one puzzled me for quite a while ;-)

hope you enjoy it!

cheers,
Aldo

__END__
# Aldo Calpini
%_ = split undef, join ' ', qw(fahokem 
xritajbugne csuctawer jhdtlrnpqloevkshpr
); print map $_{$_}, sort keys %_;

oclock.pl

Reply via email to