P
Phill. W
I've written my own replacement for MsgBox, that I do all kinds
of wierd things with. So far, it's done everything I need it to.
Until now ...
I'm trying to use it in an application that is "sensitive" to the
difference between the Activate and AppActivate "events" (the former
being handled by overriding OnActivated, the latter by interrogating
the Message argument to WndProc).
For some odd reason, when I use my MsgBox replacement, I'm
getting not one, but /two/, WM_APPActivate messages in the
calling form - values seen in WndProc:
Msg=(28), hWnd=(3081424), LParam=(2004), WParam=(0)
Msg=(28), hWnd=(3081424), LParam=(2004), WParam=(1)
This triggers all kinds of things in the application that I don't want
to happen for an "internal" dialog. Oddly, using the normal
MsgBox instead, I get /no/ wm_appactivate messages at all!
Since my replacement is little more than a Form within which I call
ShowDialog(owner) on itself, can anyone suggest where these
extraneous messages might be coming from?
Surely the CLR can't see every form in a single application as a separate
application... ?
TIA,
Phill W.
of wierd things with. So far, it's done everything I need it to.
Until now ...
I'm trying to use it in an application that is "sensitive" to the
difference between the Activate and AppActivate "events" (the former
being handled by overriding OnActivated, the latter by interrogating
the Message argument to WndProc).
For some odd reason, when I use my MsgBox replacement, I'm
getting not one, but /two/, WM_APPActivate messages in the
calling form - values seen in WndProc:
Msg=(28), hWnd=(3081424), LParam=(2004), WParam=(0)
Msg=(28), hWnd=(3081424), LParam=(2004), WParam=(1)
This triggers all kinds of things in the application that I don't want
to happen for an "internal" dialog. Oddly, using the normal
MsgBox instead, I get /no/ wm_appactivate messages at all!
Since my replacement is little more than a Form within which I call
ShowDialog(owner) on itself, can anyone suggest where these
extraneous messages might be coming from?
Surely the CLR can't see every form in a single application as a separate
application... ?
TIA,
Phill W.