Interception of mouse clicks when the mouse hangs over the control

I am working on an MFC C ++ dialog where I need to respond to right-click events for a dialog, even if the mouse is hanging over a control.

I could write event handler code for each control to delegate the work to the parent dialog, but I hope there is a more elegant solution?

I hope there is some way to intercept Windows messages, but I still think this is part. I tried listening to WM_COMMAND messages with Spy ++, but I did not see what I needed.

Any suggestions?

+3
source share
1 answer
+4

Source: https://habr.com/ru/post/1714917/


All Articles