Cursor move outside the window

Post Reply
Natter
Posts: 1402
Joined: Mon May 14, 2007 9:49 am

Cursor move outside the window

Post by Natter »

Happy New Year!

The event of hovering the mouse cursor over the window can be handled using the code block :bMMoved. How can the cursor move event be handled outside the window?

User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Cursor move outside the window

Post by Antonio Linares »

Dear Yuri,

In that case you have to capture the mouse so the mouse events keep geeting routed to the window:

SetCapture( oWnd:hWnd )

To finally release it:

ReleaseCapture()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Natter
Posts: 1402
Joined: Mon May 14, 2007 9:49 am

Re: Cursor move outside the window

Post by Natter »

Antonio, thank you for your reply!
However, I did not understand how to use SetCapture/ReleaseCapture to find out that the mouse cursor has gone beyond the outline of the window. :(

User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Cursor move outside the window

Post by Antonio Linares »

oWnd:bMMoved = { | nRow, nCol, nFlags | IsOverWnd( oWnd:hWnd, nRow, nCol ) }

oWnd:Capture()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply