views:

205

answers:

1

I am writing application which establishes shell hooks to get shell events (I am using C# if it matters). I am using this example: http://msbob.spaces.live.com/blog/cns!DAFD19BC5D669D8F!132.entry

Hook is working fine but I do not receive message on which I am interested: HSHELL_WINDOWACTIVATED (all other window-related events work well). Instead I am receiving message with code 32772 which should be HSHELL_RUDEAPPACTIVATED (some googling helped).

But I can't understand why I am not receiving HSHELL_WINDOWACTIVATED at all and what this HSHELL_RUDEAPPACTIVATED message means. MSDN does not have any mention of it. Can anybody explain it to me?

+1  A: 

HSHELL_RUDEAPPACTIVATED is 32772, which is just HSHELL_WINDOWACTIVATED with the high bit set. From what little I can glean on various Web sites, it appears that Windows sends this message when a full screen app is activated. Kind of hard to tell for sure.

Have you tried treating that message the same as `HSHELL_WINDOWACTIVATED'?

Jim Mischel
Yes, now I am treating it as HSHELL_WINDOWACTIVATED and all works fine. But I want to understand why this message is rising. It comes from any window, not only full screen apps.
koldovsky