Center the mouse?
-
Irrlicht_Rocks
- Posts: 25
- Joined: Sun Aug 14, 2005 4:35 am
Center the mouse?
How can I keep the mouse inside of the window that will work with even non-Irrlicht apps?
I'm using Visual C++ 6.0.
Thanks.
I'm using Visual C++ 6.0.
Thanks.
-
Conquistador
- Posts: 340
- Joined: Wed Sep 28, 2005 4:38 pm
- Location: Canada, Eh!
re:
Check out the cursor control functions.
-
Irrlicht_Rocks
- Posts: 25
- Joined: Sun Aug 14, 2005 4:35 am
Center the mouse?
That won't work with NON-IRRLICHT apps as well will it?
(I assume you are talking about the "cursor control functions" for Irrlicht)
(I assume you are talking about the "cursor control functions" for Irrlicht)
-
Irrlicht_Rocks
- Posts: 25
- Joined: Sun Aug 14, 2005 4:35 am
Sorry there about the double post.
I usually have auto-login checked but I must have erased my cookies.
I went to press the "Post Reply" button but I have bad aim today.
I missed and hit the "New Thread" button without even noticing it until after I had looked back at this topic not seeing my reply but a duplicate topic(which was supposed to be my reply in this thread) posted by "guest".
I usually have auto-login checked but I must have erased my cookies.
I went to press the "Post Reply" button but I have bad aim today.
I missed and hit the "New Thread" button without even noticing it until after I had looked back at this topic not seeing my reply but a duplicate topic(which was supposed to be my reply in this thread) posted by "guest".
-
Conquistador
- Posts: 340
- Joined: Wed Sep 28, 2005 4:38 pm
- Location: Canada, Eh!
re:
I'm not too big on windows programming, but there is a way to center the mouse, if you check the source for the cursor control functions in Irrlicht, then you'll see how Niko did it, or you can just google for a tutorial.
-
Conquistador
- Posts: 340
- Joined: Wed Sep 28, 2005 4:38 pm
- Location: Canada, Eh!
that functions might help you:
SetCursorPos(x,y);
mouse_event(MOUSEEVENTF_LEFTDOWN,0 ,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0 ,0,0,0);
the dimmensions what u need u can get in win api function like
Check also On Resize Event in win message control...
SetCursorPos(x,y);
mouse_event(MOUSEEVENTF_LEFTDOWN,0 ,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0 ,0,0,0);
the dimmensions what u need u can get in win api function like
Code: Select all
hwnd = CreateWindow("ClassNam", // Name of registered class
"Tytul okna", // Window title
WS_OVERLAPPEDWINDOW, // Styless
CW_USEDEFAULT, // X coordinate
0, // Y coordinate
CW_USEDEFAULT, // Width
0, // Height
NULL, // Window parent handle
NULL, // Handle to a menu
hInstance, // hInstance handle
NULL);And time has come now to ride
before the end of the night
the march of the swordmaster
to the unholy fight
before the end of the night
the march of the swordmaster
to the unholy fight
-
Guest