This is pretty much the reason why I did not go 665 yet. I saw it mentioned
somewhere that subclassing fell victim to the NEM (new event model)
altogether - if you need events, which is what subclassing achieves rather
poorly in 558, you need to take on the NEM, which does the job much better.
The problem for me is that I've been using subclassing extensively and don't
want to rewrite everything.

To be honest, instead of 665, I tried Tk for a current project and I must
say, It's not perfect, either, but it does have its strong points. The main
reason for me to switch for this particular program was a) I may have to
deliver a linux version and b) some graphics I need - the arc function of
GUI works under win2k, but not 98. And what I found is that, oddly, Tk is
much faster with those graphics.

> -----Original Message-----
> From: Straub, Peter (Peter) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 05, 2002 01:36
> To: 'perl-win32-gui-users@lists.sourceforge.net'
> Subject: [perl-win32-gui-users] subclassing in build 665?
> 
> 
> Hi all,
> 
> I try to migrate an existing application from 558
> to 665 and I am stuck because subclassing doesn't
> (seem to) work in this version...
> I subclass rich edit controls to make them mouse-
> and keystroke-aware:
> 
> my $EditorClass = new Win32::GUI::Class(
>   -name => "Editor",
>   -extends => "RichEdit",
>   -widget => "RichEdit",
> );
> 
> my $redAllMessages = $winMain->AddRichEdit(
>   -class     => $EditorClass,
>   -name     => "RedMessages",
>   -text     => "",
>   -left     => 0,
>   -top      => 0,
>   -addstyle => WS_TABSTOP |
>                WS_CHILD |
>                WS_VISIBLE |
>                WS_HSCROLL |
>                WS_VSCROLL |
>                ES_LEFT |
>                ES_READONLY |
>                ES_MULTILINE,
>   -addexstyle  => WS_EX_CLIENTEDGE,
> );
> 
> This works for "LButtonDown" and "MouseMove"
> events and helps to implement sorts of "links"
> and a custom cursor shape.
> Is there a way to achieve this in version 665?
> Should I wait for 772 :)?
> Please advise...
> 
> Cheers-
> Peter
> 

Reply via email to