Detecting WA_ACTIVE

Hi,

I'm having a problem detecting the WA_ACTIVE event.

I have an event hook on a program and i want to detect when it is activated and then do my stuff accordingly.

i can detect the WM_ACTIVATE message (i've tested this), but can;t filter any of the WA_ACTIVE ro WA_CLICKACTIVE messages. am i filtering it correctly?

LPCWPSTRUCT pCwp = (LPCWPSTRUCT) lParam;

switch (pCwp->message)
{
.
.
case WM_ACTIVATE:

if( LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE)
{
char buf[128];
sprintf(buf, "here wa_active");
MessageBox(NULL, buf, NULL, 0);
}
break;
.
.
}

the callback method looks like this

RESULT CALLBACK AppEventsHook (int nCode, WPARAM wParam, LPARAM lParam)

any ideas?

Thanks Matt.
[860 byte] By [flynny1st] at [2007-11-20 8:29:03]
# 1 Re: Detecting WA_ACTIVE
please read it .

http://msdn2.microsoft.com/en-us/library/ms646274.aspx

msdn already mention that
WA_ACTIVE

Activated by some method other than a mouse click

(for example, by a call to the SetActiveWindow function or by use of the keyboard interface to select the window).
ashukasama at 2007-11-9 13:30:23 >
# 2 Re: Detecting WA_ACTIVE
OK so should the WA_CLICKACTIVE not fre the msg box though, if i deactivate the window (go to another program) and then reactivate it with a click (focus the window again with a click)?

Matt.
flynny1st at 2007-11-9 13:31:23 >