Catch Click / DoubleClick events in a management container?

We have third-party control in our project created by SubSystems.com, called TE Edit Control , also known as β€œTern,” which seems to be a word processor emulator. I searched for SO for everyone who used this control, but it seems that it is not very popular. They do not have support contact information; they blame everyone who wants to help with their product.

In any case, something very stupid happens in the events under their control - in particular, MouseClick and MouseDoubleClick. If the document has an image and you double-click on the image, events are not triggered. But if you subsequently click on the main part of the document, the DoubleClick event for control suddenly appears , and not just a single click event. It seems that the event gets somewhere in the queue and wakes up at the most inopportune time.

I am not going to waste time understanding why their control behaves so strangely. But I need a workaround for this behavior. Is there any way that mouse clicks on this control are passed to the containing control, so I can at least try to use a more reliable source for my events?

Any other suggestions on how to securely capture click / doubleclick events would be greatly appreciated!

+3
source share
1 answer

One approach is to add an application level message filter.

, Application.AddMessageFilter(...). - -, IMessageFilter, PreFilterMessage. ​​ . , , . , , .

+3

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


All Articles