I subclass several windows's messages of a form from an ActiveX component.
If the client program executes an End statement when the subclassed form is
flashing (the form was loaded and activated, but the app doesn't have the
focus), and at that moment the End occur, it crashes (it actually exits the
VB IDE without any crash message).

I'm using the SSubTmr from vbaccelerator.

The problem occurs only if i have subclassed the WM_ACTIVATE or
WM_NCACTIVATE messages, if i remove these messages, the problem doesn't
arise.
The problem occur even if i have no code for the WM_ACTIVATE message in the
WindowProc procedure, also if i call the CallOldWindowProc, or whatever code
i tried for that message.

Re: problem subclassing WM_ACTIVATE by Sinna

Sinna
Tue Oct 14 01:12:21 CDT 2008

Eduardo wrote:
> I subclass several windows's messages of a form from an ActiveX component.
> If the client program executes an End statement when the subclassed form is
> flashing (the form was loaded and activated, but the app doesn't have the
> focus), and at that moment the End occur, it crashes (it actually exits the
> VB IDE without any crash message).
>
> I'm using the SSubTmr from vbaccelerator.
>
> The problem occurs only if i have subclassed the WM_ACTIVATE or
> WM_NCACTIVATE messages, if i remove these messages, the problem doesn't
> arise.
> The problem occur even if i have no code for the WM_ACTIVATE message in the
> WindowProc procedure, also if i call the CallOldWindowProc, or whatever code
> i tried for that message.
>
>
You should never use the End statement as it doesn't allow the IDE / OS
to perform a clean shutdown. The fact that you don't have the problem
when WM_(NC)ACTIVATE are not subclassed is only a lucky shot. Some day
it will crash.


Sinna

Re: problem subclassing WM_ACTIVATE by Eduardo

Eduardo
Tue Oct 14 02:18:25 CDT 2008

"Sinna" <news4sinna_NOSPAM@hotpop.com> escribió en el mensaje
news:OoIuiPcLJHA.1156@TK2MSFTNGP05.phx.gbl...
> Eduardo wrote:
>> I subclass several windows's messages of a form from an ActiveX
>> component.
>> If the client program executes an End statement when the subclassed form
>> is flashing (the form was loaded and activated, but the app doesn't have
>> the focus), and at that moment the End occur, it crashes (it actually
>> exits the VB IDE without any crash message).
>>
>> I'm using the SSubTmr from vbaccelerator.
>>
>> The problem occurs only if i have subclassed the WM_ACTIVATE or
>> WM_NCACTIVATE messages, if i remove these messages, the problem doesn't
>> arise.
>> The problem occur even if i have no code for the WM_ACTIVATE message in
>> the WindowProc procedure, also if i call the CallOldWindowProc, or
>> whatever code i tried for that message.
> You should never use the End statement as it doesn't allow the IDE / OS to
> perform a clean shutdown. The fact that you don't have the problem when
> WM_(NC)ACTIVATE are not subclassed is only a lucky shot. Some day it will
> crash.

Yes, i don't use the End statement.
But unfortunately, i cannot decide what the client will use or not to use.
It's an ActiveX component that is used for other people.



Re: problem subclassing WM_ACTIVATE by Eduardo

Eduardo
Tue Oct 14 02:19:55 CDT 2008


"Eduardo" <mm@mm.com> escribió en el mensaje news:gd1h4d$p8e$1@aioe.org...

> It's an ActiveX component that is used for other people.

i mean "by"



Re: problem subclassing WM_ACTIVATE by Mike

Mike
Tue Oct 14 01:35:58 CDT 2008

"Eduardo" <mm@mm.com> wrote in message news:gd1avm$51k$1@aioe.org...

> I subclass several windows's messages of a form from
> an ActiveX component. If the client program executes
> an End statement when the subclassed form is flashing (the form was loaded
> and activated, but the app
> doesn't have the focus), and at that moment the End
> occur, it crashes (it actually exits the VB IDE without
> any crash message).

Don't use the End statement. It halts your program abruptly without
executing any code that may be in any of your Unload, QueryUnload, or
Terminate events.

Mike




Re: problem subclassing WM_ACTIVATE by Alfie

Alfie
Tue Oct 14 04:20:21 CDT 2008

On Tue, 14 Oct 2008 04:18:25 -0300, "Eduardo" <mm@mm.com> wrote:

>Yes, i don't use the End statement.
>But unfortunately, i cannot decide what the client will use or not to use.
>It's an ActiveX component that is used for other people.
>
You will need to specify to your clients that END is not supported
with your component and will cause crashes if used.

There is nothing you can do to keep your code stable if the client
uses END as it will immmediately halt code execution and will not
allow SSubTmr or any other code to clean itself up properly.

As you mention crashing in the IDE the same applies for the END button
when running in the IDE.
--
Alfie [UK]
<http://www.delphia.co.uk/>
The best way to win an argument is to begin by being right


Re: problem subclassing WM_ACTIVATE by Bill

Bill
Tue Oct 14 05:25:39 CDT 2008

Hi Eduardo,

The correct newsgroup for asking winapi questions is the:

microsoft.public.vb.winapi

newsgroup. Please post your winapi questions there in the future.



"Eduardo" <mm@mm.com> wrote in message news:gd1avm$51k$1@aioe.org...
>I subclass several windows's messages of a form from an ActiveX component.
> If the client program executes an End statement when the subclassed form
> is flashing (the form was loaded and activated, but the app doesn't have
> the focus), and at that moment the End occur, it crashes (it actually
> exits the VB IDE without any crash message).
>
> I'm using the SSubTmr from vbaccelerator.
>
> The problem occurs only if i have subclassed the WM_ACTIVATE or
> WM_NCACTIVATE messages, if i remove these messages, the problem doesn't
> arise.
> The problem occur even if i have no code for the WM_ACTIVATE message in
> the WindowProc procedure, also if i call the CallOldWindowProc, or
> whatever code i tried for that message.
>


Re: problem subclassing WM_ACTIVATE by Bert

Bert
Tue Oct 14 06:19:08 CDT 2008

Huh?
Is it correct, Eduardo, that we're NOT talking
about VB6 (or lower)?
Bert.


"Bill McCarthy" <Bill@localhost.com> schreef in bericht
news:OfMkOjeLJHA.1012@TK2MSFTNGP04.phx.gbl...
> Hi Eduardo,
>
> The correct newsgroup for asking winapi questions is the:
>
> microsoft.public.vb.winapi
>
> newsgroup. Please post your winapi questions there in the future.
>


Re: problem subclassing WM_ACTIVATE by Eduardo

Eduardo
Tue Oct 14 06:26:14 CDT 2008

Consider this my only answer to you:

Dear troll:

This is subclassing, so the API group isn't for this either.

Even when it's not so specific, this group covers also API and all related
to VB3 to 6 (or may be VB1 to 6).
What this group doesn't cover, is other languages (C++, OpenInventor, Ook!,
Brainfuck, .Net, etc.)

If you don't understand something so easy like this, going to a psychologist
may help.


"Bill McCarthy" <Bill@localhost.com> escribió en el mensaje
news:OfMkOjeLJHA.1012@TK2MSFTNGP04.phx.gbl...
> Hi Eduardo,
>
> The correct newsgroup for asking winapi questions is the:
>
> microsoft.public.vb.winapi
>
> newsgroup. Please post your winapi questions there in the future.
>
>
>
> "Eduardo" <mm@mm.com> wrote in message news:gd1avm$51k$1@aioe.org...
>>I subclass several windows's messages of a form from an ActiveX component.
>> If the client program executes an End statement when the subclassed form
>> is flashing (the form was loaded and activated, but the app doesn't have
>> the focus), and at that moment the End occur, it crashes (it actually
>> exits the VB IDE without any crash message).
>>
>> I'm using the SSubTmr from vbaccelerator.
>>
>> The problem occurs only if i have subclassed the WM_ACTIVATE or
>> WM_NCACTIVATE messages, if i remove these messages, the problem doesn't
>> arise.
>> The problem occur even if i have no code for the WM_ACTIVATE message in
>> the WindowProc procedure, also if i call the CallOldWindowProc, or
>> whatever code i tried for that message.
>>
>



Re: problem subclassing WM_ACTIVATE by Eduardo

Eduardo
Tue Oct 14 06:28:09 CDT 2008

"Alfie [UK]" <alfie@mail.invalid> escribió en el mensaje
news:krn8f41iru398l84u9jgrsk7p57ulbhc8r@4ax.com...
> On Tue, 14 Oct 2008 04:18:25 -0300, "Eduardo" <mm@mm.com> wrote:
>
>>Yes, i don't use the End statement.
>>But unfortunately, i cannot decide what the client will use or not to use.
>>It's an ActiveX component that is used for other people.
>>
> You will need to specify to your clients that END is not supported
> with your component and will cause crashes if used.

Well, I won't specify this for only a strange situation like the one i
mentioned that is very unlikely to happen.
Anyway, if there is a solution, i would like to fix it.



Re: problem subclassing WM_ACTIVATE by Bill

Bill
Tue Oct 14 06:28:26 CDT 2008


"Bert van den Dongen" <bertdon@tiscali.nl> wrote in message
news:48f4802b$0$24409$5fc3050@news.tiscali.nl...
> Huh?
> Is it correct, Eduardo, that we're NOT talking
> about VB6 (or lower)?


The winapi group is for VB6 and lower also. It is the correct group for
winapi questions such Eduardo's.
That has always been the case.

Thanks.


> Bert.
>
>
> "Bill McCarthy" <Bill@localhost.com> schreef in bericht
> news:OfMkOjeLJHA.1012@TK2MSFTNGP04.phx.gbl...
>> Hi Eduardo,
>>
>> The correct newsgroup for asking winapi questions is the:
>>
>> microsoft.public.vb.winapi
>>
>> newsgroup. Please post your winapi questions there in the future.
>>
>


Re: problem subclassing WM_ACTIVATE by Bill

Bill
Tue Oct 14 06:30:24 CDT 2008


"Eduardo" <mm@mm.com> wrote in message news:gd1vl2$fj7$1@aioe.org...
> Consider this my only answer to you:
>
> Dear troll:
>
> This is subclassing, so the API group isn't for this either.
>

Wrong. The API group is for things such as WM_ACTIVATE. That is winapi.




Re: problem subclassing WM_ACTIVATE by Kevin

Kevin
Tue Oct 14 06:43:43 CDT 2008

FO McWilly. "General discission" has always encompassed API questions. You
are most certainly not the "leader: of this group, so stop acting like it.
Go torment the .net groups where quite frankly, you belong.


"Bill McCarthy" <Bill@localhost.com> wrote in message
news:eKGG9$eLJHA.2164@TK2MSFTNGP02.phx.gbl...
|
| "Bert van den Dongen" <bertdon@tiscali.nl> wrote in message
| news:48f4802b$0$24409$5fc3050@news.tiscali.nl...
| > Huh?
| > Is it correct, Eduardo, that we're NOT talking
| > about VB6 (or lower)?
|
|
| The winapi group is for VB6 and lower also. It is the correct group for
| winapi questions such Eduardo's.
| That has always been the case.
|
| Thanks.
|
|
| > Bert.
| >
| >
| > "Bill McCarthy" <Bill@localhost.com> schreef in bericht
| > news:OfMkOjeLJHA.1012@TK2MSFTNGP04.phx.gbl...
| >> Hi Eduardo,
| >>
| >> The correct newsgroup for asking winapi questions is the:
| >>
| >> microsoft.public.vb.winapi
| >>
| >> newsgroup. Please post your winapi questions there in the future.
| >>
| >
|



Re: problem subclassing WM_ACTIVATE by Mike

Mike
Tue Oct 14 07:14:40 CDT 2008


"Bill McCarthy" <Micro$oft MostValuablePuppet> wrote in message
news:OfMkOjeLJHA.1012@TK2MSFTNGP04.phx.gbl...

> The correct newsgroup for asking winapi questions is the:
> microsoft.public.vb.winapi newsgroup. Please post your
> winapi questions there in the future.

Go peddle your rubbish elsewhere, McCarthy. Questions relating to using
WinAPI in conjunction with Classic Visual Basic are fine here. What you say
on the matter counts for nothing.

Mike




Re: problem subclassing WM_ACTIVATE by Bill

Bill
Tue Oct 14 07:32:36 CDT 2008


"Mike Williams" <Mike@WhiskyAndCoke.com> wrote in message
news:Ot8c6bfLJHA.5660@TK2MSFTNGP03.phx.gbl...
>
> "Bill McCarthy" <Micro$oft MostValuablePuppet> wrote in message
> news:OfMkOjeLJHA.1012@TK2MSFTNGP04.phx.gbl...
>
>> The correct newsgroup for asking winapi questions is the:
>> microsoft.public.vb.winapi newsgroup. Please post your
>> winapi questions there in the future.
>
> Go peddle your rubbish elsewhere, McCarthy. Questions relating to using
> WinAPI in conjunction with Classic Visual Basic are fine here. What you
> say on the matter counts for nothing.
>

Wrong on all counts. The winapi group is the right place to ask winAPI
question. That's really not hard to understand. In fact it's always been
that way. Of course you are a relative newbie here so you obviously have no
respect for the history of this place.

Any way, I'm not going to waste my time arguing this with you. It's clear
you are trolling like your posts about beer in here, and your posts about
recipes. Now you want winapi in here as well. Next you'll probably be
wanting Microsoft to close the group <sigh />
But do try to use a little self control and pause and think about it. The
vb.winapi group is there clearly for winapi questions.

(oh and you can have the last word. Bet ya can't resist ;))




Re: problem subclassing WM_ACTIVATE by Mike

Mike
Tue Oct 14 10:31:04 CDT 2008

"Bill McCarthy" <Bill@localhost.com> wrote in message
news:%23fkb0jfLJHA.1204@TK2MSFTNGP05.phx.gbl...

> The winapi group is the right place to ask winAPI question.

When did you change the rules, McCarthy? I've just checked your posting
history and in just a few minutes I've already lost count of the number of
posts in which you answered questions where either the question and / or
your answer contained references to the various WinAPI functions. You're a
tit head, McCarthy, a Micro$oft Most Valuable Puppet whose sole aim is to
destroy this group. Go peddle your nonsense elsewhere!

> Of course you are a relative newbie here so you obviously
> have no respect for the history of this place.

I've been here, and in other Classic VB groups, for a fair number of years
and I have a great respect for these groups, although that respect is
beginning to fall off since they became infested with trojan's such as
yourself. You are an infestation McCarthy, and the sooner we rid ourselves
of you the better.

Mike