I use it to get some more mouse-related events. The most useful class for
that is the RichEdit class.
new Win32::GUI::Class
(
-name => 'PoorEdit',
-widget => 'RichEdit',
-extends => 'RichEdit',
);
$Main->AddRichEdit(
-name => "Rich",
-class => "PoorEdit",
...
that gives you Rich_LButtonDown, Rich_LButtonUp, Rich_RButtonDown,
Rich_RButtonUp, and Rich_KeyPress. Maybe even Rich_MouseMove, I'm not sure.
You can safely say
-widget => 'Button',
-extends => 'RichEdit',
to use this class on a button - however, I think that will kill the
3D-behavior (the button looking like being pushed inwards by a mouse-click
and popping back upon release)
Sometimes you will get _Anonymous events for a widget with the message ID as
first parameter - that may be exploited, but you won't get all the "missing"
events on all the widgets. I also don't remember what other classes are
there - I got this wisdom from reading the GUI.xs source code (look for
"MsgLoop", especially "RichEditMsgLoop" and go from there).
Note, this applies to Win32-GUI Version 0.0.558 - from V.665, there is a
totally new event model (conveniently called "new event model", NEM) which
renders the classes inoperative. With this NEM, you can get any widget to
invoke subs for a lot of events, so in fact that's a lot better - I hear.
Didn't play around with it myself yet.
Have fun,
Harald
> -----Original Message-----
> From: Steven Swenson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 09, 2002 15:20
> To: [email protected]
> Subject: [perl-win32-gui-users] Win32::GUI::Class() ??
>
>
> Hi all,
> I was curious if anyone has any examples of how to use the
> Win32::GUI::Class function to create new class of windows?
> Would this allow the use of new events? or combination of
> existing classes?
>
> --Steve
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Stuff, things, and much much more.
> http://thinkgeek.com/sf
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>