> > Thanks. I never thought about that. Matthew
> > Curland showed a similar method for UserControls
> > to subclass themselves, but it hadn't occurred
> > to me that calling out to the .bas might be
> > required.
>
> I'd be interested in looking at that method by Matt. Do you recall, was
it in his
> book or one of his VBPJ columns?
>
It's in his book and a limited example was in
August 2001 VBPJ:
Black Belt Programming: Provide Pointers to Class Functions
If you have the book there are sample projects
on the CD, in PowerVB\Samples\CreateWindow.
If you have trouble finding it look for
"InitPushParamThunk". That's the name of a function
using inline assembly that's part of the very small
amount of code needed to set up any number of
UCs to subclass themselves and/or their consituent
controls. The whole thing was presented in his book
as a way to use owner-drawn windows that could
be wrapped in the convenience of VB by "anchoring"
them on a UC.
(I seem to remember a group discussion some time back
about this, so I went to check your site. I was just looking
at your HookMe sample, trying to figure out if that was a
similar approach, but so far I don't get it. You're using classes
to enable multiple subclasses? I've never seen GetProp and
SetProp before.)