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

WH_GETMESSAGE proc

81 views
Skip to first unread message

Charlie Culver

unread,
May 10, 1998, 3:00:00 AM5/10/98
to

I have a WH_GETMESSAGE procedure in my program. It works just fine,
other than the fact that it does not receive the WM_KILLFOCUS,
WM_SETFOCUS, WM_KILLFOCUS, WM_ACTIVATEAPP, or WM_ACTIVATE messages, not
to mention others that I haven't discovered yet. I was wondering why
this happens, for the messages are sent to the procedure "when the
GetMessage function has retrieved a message from an application message
queue". The only thing I can think of is that these messages are never
retrieved by the GetMessage function, but by some other function. If
anyone has any insight, please mail me (take off the dashes).


Raymond Chen

unread,
May 10, 1998, 3:00:00 AM5/10/98
to

WH_GETMESSAGE only intercepts messages returned by GetMessage -
these are created via PostMessage and PostThreadMessage Many
system messages are sent via SendMessage - you need
WH_CALLWNDPROC to catch those.
--
(My return address is intentionally invalid; delete ".---" to get my real address.
My responses are not to be considered official technical support or advice.)

Charlie Culver

unread,
May 10, 1998, 3:00:00 AM5/10/98
to

So if I implement two hooks, one WH_GETMESSAGE and one WH_CALLWNDPROC, will any
messages overlap in the two or will I be ok? In other words, are any messages
intercepted by both the WH_GETMESSAGE and the WH_CALLWNDPROC hooks?
Charlie Culver

Raymond Chen

unread,
May 12, 1998, 3:00:00 AM5/12/98
to

On Sun, 10 May 1998 20:07:49 -0400, Charlie Culver
<paper@----------erols.com> wrote:
>So if I implement two hooks, one WH_GETMESSAGE and one WH_CALLWNDPROC, will any
>messages overlap in the two or will I be ok? In other words, are any messages
>intercepted by both the WH_GETMESSAGE and the WH_CALLWNDPROC hooks?

This is explained in the dcoumentation for SetWindowsHookEx,
GetMsgProc, and CallWndProc.

0 new messages