Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Set mouse position
Re: Set mouse position [message #54340 is a reply to message #54339] Fri, 26 June 2020 18:15 Go to previous messageGo to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Hello Raylan,

From my knowledge,
if you want to set the cursor / mouse position you must use the OS api :

for windows :
https://docs.microsoft.com/en-us/windows/win32/api/winuser/n f-winuser-setcursorpos

Here you have one exemple (I use it to center mouse cursor on middle of my windows at every draw loop)
    SetCursorPos(topWindow->GetPos().x.GetA() + (GetSize().cx/2) +1,topWindow->GetPos().y.GetA() + (GetSize().cy/2)+1 );

Don't forget to include <Winuser.h>

For linux : I have no idea, maybe a quick google search will awnser your question



 
Read Message
Read Message
Read Message
Previous Topic: Eigen updated
Next Topic: SSH Exec output truncated
Goto Forum:
  


Current Time: Sun Aug 10 22:39:53 CEST 2025

Total time taken to generate the page: 0.03354 seconds