Using Spy++ tool on Visual Studio I can see that windows like the Desktop or Explorer(The File Explorer thing) receive WM_ messages, but windows like Firefox or Visual Studio do not receive messages.
Why do some receive messages and others don't.
(By WM_ messages, I mean things like, WM_MOUSELEAVE
or WM_SETCURSOR
)
Spy++ needs to inject a hook to monitor window messages. For this to work, the bitness of the hook function needs to match the bitness of the process owning the window, and therefore you should use the 32-bit version of Spy++ to monitor windows of 32-bit apps, and the 64-bit version to monitor 64-bit apps.
(That is, after all, why two versions of Spy++ get installed)
I am running VS 2017 on 64bit windows. I used spy++ from the IDE tools menu but it do not log messages. And then I see the answer of Ben Voigt and check the version and it's a x86 version. And the vs 2017 ide is in a program files(x86) directory. So I look around try to download a x64 version of spy++ and failed. And I can not choose x86 or x64 when I try to install a vs2019. Finally I found there is a spy++ x64 version spyxx_xxx64.exe in the same directory of the spy++ x86 version. The tools menu somehow picked the wrong one. So if you run into same problem as me, just find and pin the x64 version of spy++ somewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With