问题
While we all got tangled up in this topic, it came to light that, while UWP apps do have top level windows and you can send (sensible) messages to them (*), and these do get through and have the expected effect, Spy++ doesn't ever seem to see those messages, or indeed any others that Windows itself might send.
Can anyone shed any light on this?
Just to provide a bit of background, Spy has no problem locating and inspecting these windows (the 'Finder Tool' works just fine) but message logging is totally mute. I have tested the Settings App, the On Screen Keyboard, Calendar and Calculator, and I did tick all the appropriate 'Additional windows' checkboxes in Spy. I also used Process Explorer to check that Spy runs at 'High Integrity Level' (because it runs elevated, presumably), and it does.
(*) Yes, I know we're not supposed to but, well, you know.
回答1:
Um, embarrassing. You need to use the 64 bit version of Spy to spy on a 64 bit app (and vice-versa). Then it works fine and you get what you expect.
Of course, it would be nice if Spy told you when you try to trace messages in an app of the wrong bitness but it doesn't, so please be warned.
来源:https://stackoverflow.com/questions/50437413/why-cant-spy-see-messages-sent-to-uwp-apps