Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, degenerate_762, ozgur), 1,311 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How do I cage the mouse within a window? #270561
06/08/09 18:06
06/08/09 18:06
Joined: Aug 2005
Posts: 119
Madison, WI
J
JakeL Offline OP
Member
JakeL  Offline OP
Member
J

Joined: Aug 2005
Posts: 119
Madison, WI
Is there an easy way to keep the mouse curser inside the engine window while in windowed mode? I'm sure this has been done before because it seems like something that people would need.

Is there a .dll out there or some API function that makes this easy? Something I missed in the manual?

Sorry if this is out there already. I spent a couple hours looking. Maybe I just don't know the correct terminology.


If you need graphic resources, or just want to see some of my work, check out our site AdenFall Software.
Re: How do I cage the mouse within a window? [Re: JakeL] #270567
06/08/09 18:25
06/08/09 18:25
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
you can do it without need of a dll,

include windows.h and use

SetCursorPos(x,y);
more info: http://msdn.microsoft.com/en-us/library/ms648394(VS.85).aspx

clamp x and y variables, and set mouse pos according to this variables in a loop.


3333333333
Re: How do I cage the mouse within a window? [Re: Quad] #270569
06/08/09 18:32
06/08/09 18:32
Joined: Aug 2005
Posts: 119
Madison, WI
J
JakeL Offline OP
Member
JakeL  Offline OP
Member
J

Joined: Aug 2005
Posts: 119
Madison, WI
Thanks Quadraxas! That is exactly what I needed.


If you need graphic resources, or just want to see some of my work, check out our site AdenFall Software.
windows mouse position [Re: JakeL] #271042
06/10/09 23:16
06/10/09 23:16
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
hey that was very helpfull, just what I was looking for also.
Do you also know how to hide/show the windows mouse easily and change the windows cursor icon?


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: windows mouse position [Re: Carlos3DGS] #271062
06/11/09 05:07
06/11/09 05:07
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
By using "mouse_mode" and "mouse_map".

Re: windows mouse position [Re: Cowabanga] #271143
06/11/09 14:11
06/11/09 14:11
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
I dont mean the engine's cursor, I mean changing window's cursor.


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1