Does anybody know what means ShellHook message HSH

2019-03-27 00:04发布

问题:

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:

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'?