Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Attn: Euclides Zoto

7 views
Skip to first unread message

Wildman

unread,
Oct 1, 2015, 3:36:22 PM10/1/15
to
In the video editor thread you mentioned Visual Basic.
I have a question about VB3 that I am hoping you might
be able to answer. Do you happen to know if it is
possible to subclass a form in VB3 or 16-bit VB4?

In 32-bit VB two API calls are used, SetWindowLong and
CallWindowProc. 16-bit VB has SetWindowLong but not
CallWindowProc so it looks like is not possible unless
there is another API that can be used for CallWindowProc.
Do you happen to have any info on this?

--
<Wildman> GNU/Linux user #557453
Keyboard not detected! Press any key to continue...

Euclides Zoto

unread,
Oct 1, 2015, 8:42:39 PM10/1/15
to
I believe this link will help you.

www.tutorialized.com/tutorial/windows-API/3890

As far as I recall there is no alternative API so it isn't possible.

EZoto

Auric__

unread,
Oct 3, 2015, 3:11:41 AM10/3/15
to
Wildman wrote:

> In the video editor thread you mentioned Visual Basic.
> I have a question about VB3 that I am hoping you might
> be able to answer. Do you happen to know if it is
> possible to subclass a form in VB3 or 16-bit VB4?
>
> In 32-bit VB two API calls are used, SetWindowLong and
> CallWindowProc. 16-bit VB has SetWindowLong but not
> CallWindowProc so it looks like is not possible unless
> there is another API that can be used for CallWindowProc.
> Do you happen to have any info on this?

I'm pretty sure it can't be done.

--
Oh, look!
It's my favorite bad penny and she's covered in righteous anger.

Euclides Zoto

unread,
Oct 3, 2015, 8:47:02 AM10/3/15
to
You just made me realize in my post that I yoda my responses. I meant
to say:

It isn't possible, and as far as I recall there is no alternative api.

Shows how careful I have to be when typing because what is in my mind
isn't always what I type.

EZoto

Wildman

unread,
Oct 3, 2015, 11:53:24 AM10/3/15
to
Thanks EZoto and Auric. I think you are both right in
that it can't be done but not for the reason I thought.
The Win3.1 API Help does not list CallWindowProc but the
Win3.1 SDK does so the API is there. I confirmed that by
placing a CallWindowProc declare statement into a VB3
program. It compiled without any errors. If the API
didn't exist then VB would have complained.

But, there is another problem. The operator AddressOf
that has to be used in the SetWindowLong API call is
not supported in VB3 so getting the address of the
new window procedure does not appear to be possible.
Without that address subclassing is not possible and
I can see no way to get it, unless either one of you
have a trick up your sleeve.

Thanks again.

--
<Wildman> GNU/Linux user #557453
I am Fudd of Borg! Wesistance is usewess!

Auric__

unread,
Oct 4, 2015, 3:15:53 AM10/4/15
to
Wildman wrote:

> But, there is another problem. The operator AddressOf
> that has to be used in the SetWindowLong API call is
> not supported in VB3 so getting the address of the
> new window procedure does not appear to be possible.
> Without that address subclassing is not possible and
> I can see no way to get it, unless either one of you
> have a trick up your sleeve.

I seem to recall a way around that... but it's been a LONG time. I'd have to
find my copy of VB3 and dink around in it, and I don't exactly have a lot of
free time these days.

--
Farewells must never be sad.

Wildman

unread,
Oct 6, 2015, 9:11:14 PM10/6/15
to
I posted this question in a VB discussion group and I got
a response with a link to a vbx/ocx called MsgHook. It
will "hook" messages in the same way that subclassing does.
It comes in a 16-bit vbx, 16-bit ocx and 32-bit ocx. I
tried it here with VB3 and it worked perfectly. Since you
are a Win16 guy, I thought you might be interested. Here
is the link...

http://test.epeterson.net/tools/MsgHook/

I have a VB3 project where I tested MsgHook if you want to
take a look at it. You will need to have MsgHook installed
first. I can put it up on Dropbox.

--
<Wildman> GNU/Linux user #557453
The cow died so I don't need your bull!

Euclides Zoto

unread,
Oct 7, 2015, 9:35:54 PM10/7/15
to
I am absolutely stunned. You think that everyone has given up on windows
3.1 and 16 bit and then there is someone out there that still "loves"
windows 3.1. That's the only reason this guy would do this. I am amazed
you even found this link or it even existed. Shows you really have a
heart for this OS. Kudos to you dude.

EZoto
0 new messages