Skip to main content
Inspiring
January 31, 2023
Answered

hit test on Layout - Detect whether any UI panel/Dialog is at hit test mouse position

  • January 31, 2023
  • 1 reply
  • 159 views

Hi,

 

I have implemented "CIdleMouseWatcher" and able to get global mouse position.

On MouseMove, I am able to hit test the mouse position on layout to figure out underlying frame.

 

If any UI panel/dialog is appearing on top of the frame then also hittest works and I get the underlying frame.

 

But I need to detect if at hit test point any UI panel/dialog is there then I want to stop my operation.

 

Any suggestions, how can we detect whether any panel/dialog is at global mouse position ?

 

Regards,

Rahul Rastogi

 

 

This topic has been closed for replies.
Correct answer Rahul_Rastogi

Found the solution -

 

InterfacePtr<IWindow> iWindow(Utils<IWindowUtils>()->QueryWindowUnderPoint(newMouse, kFalse));

1 reply

Rahul_RastogiAuthorCorrect answer
Inspiring
February 1, 2023

Found the solution -

 

InterfacePtr<IWindow> iWindow(Utils<IWindowUtils>()->QueryWindowUnderPoint(newMouse, kFalse));