How do I get mouse cursor position behind a control?

  

I am using C++Builder 10.3 and FMX.

There is a TImage control, on which multiple TRectangle controls are generated by some operation. The TRectangles are filled with claLightGray.

To get the mouse cursor position, I am using the OnMouseMove event for the TImage control. The problem is that I cannot get the mouse cursor position when the mouse moves into a TRectangle control on the TImage control.

How can I get the mouse cursor position for the TImage when it is on a TRectangle? I hope TRectangle is transparent to TImage in terms of mouse cursor position.

Comments are closed.