Get Mouse Position Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Get Mouse Position

Post by protocol »

Is there a wx function or procedure that will return the mouse position even when the mouse is not over a wxWindow.

I was going to use a wxTimer to update the coordinates. But then I realized I don't know of any function that retains the mouse position. Please help.

Thanks in advance.

FYI: I know MFC has global hooks, but cross-platform programming is my aim.
User avatar
Ryan Norton
wxWorld Domination!
wxWorld Domination!
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Re: Get Mouse Position

Post by Ryan Norton »

protocol wrote:Is there a wx function or procedure that will return the mouse position even when the mouse is not over a wxWindow.

Code: Select all

wxGetMousePosition()
[Mostly retired moderator, still check in to clean up some stuff]
protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

thanks

Post by protocol »

I totally forgot to check the ::wx function list.
Post Reply