Ok, sorry about that, I understand now.
In your case you are receiving this message when you shouldn't be,...
Yes. Unfortunately, I can ignore redundant messages, but I can't block sending them, which means I need to patch all component classes. And I have dozens of these classes.
Situation is even worst, because when I receive an unwanted
CM_MOUSELEAVE message and then I move cursor (still within the control), the
CM_MOUSEENTER will be received. So I have
two methods to patch –
CMMouseEnter and
CMMouseLeave.
Under
Lazarus 1.6.4, LCL classes works different, but not good too. Parent form sometimes did not send
CM_MOUSELEAVE message, when I quickly moved the cursor and it left the area of the component, outside the window. The component did not receive this message, so it still looked like the cursor was over it. I made a patch inside two of my custom base classes, based on simple timer. If control did not receive message, then the timer check the cursor position and if it was outside the component, send it to the control – it works very good. Under
Lazarus 1.8, the window does not forget to send this message, now it sends too much.