Window Message Monitor - Is is possible to prevent a message from being handled by other Monitor's instances? #147
-
|
I think the title says it all. Since WindowEx has its own monitor and it is possible to create multiple monitors for one window, is there a way to handle a message and notify the infrastructure that no other monitors should process it? I am aware this is a bit of a far-fetched scenario as developers must have good control over their monitors, but I am curios. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Check the Handled parameter - if another listener already handled it, it will be true WinUIEx/src/WinUIEx/WindowManager.cs Lines 258 to 259 in c834d3d |
Beta Was this translation helpful? Give feedback.
-
|
Judging by what I can see with the WinUIEx sample app, mesage monitor gets windows messages from the menu bar and non client areas around the edges of the window. So, you need to go back to the event handlers provided by the Controls on the window. I haven't dig deeper into this, but to get mesages form all the window area, including the client area, it must get started before .NET itself taps on the Win32 message. |
Beta Was this translation helpful? Give feedback.
Check the Handled parameter - if another listener already handled it, it will be true
WinUIEx/src/WinUIEx/WindowManager.cs
Lines 258 to 259 in c834d3d