Getting the absolute mouse position with SlimDX

Started by
12 comments, last by jpetrie 11 years, 2 months ago
How could that be done? Thanks.
Advertisement
Cursor.Position
Ah, thanks, but I'm looking specifically for solutions using SlimDX. That is helpful in the interim, however.
Quote:specifically for solutions using SlimDX

Could you please explain why? I don't really understand the idea behind this..
Quote:Original post by snake5
Quote:specifically for solutions using SlimDX

Could you please explain why? I don't really understand the idea behind this..

It's for a graphics library using SlimDX.
Quote:Original post by Narf the Mouse
It's for a graphics library using SlimDX.
So? SlimDX is built on top of the Windows OS, there's no reason not to use the Windows OS to get the cursor position. The cursor position has nothing to do with graphics.
Good point. It just bugs me that I can't.
Why? Getting/setting the mouse position has nothing to do with the graphics API that is being used.
Quote:Original post by jtagge75
Why? Getting/setting the mouse position has nothing to do with the graphics API that is being used.

Gee, maybe it's the Mouse class in the SlimDX library. Having a Mouse class is generally a sign of Mouse-related data.

Now go dogpile on someone else.
Quote:Original post by Narf the Mouse
Quote:Original post by jtagge75
Why? Getting/setting the mouse position has nothing to do with the graphics API that is being used.

Gee, maybe it's the Mouse class in the SlimDX library. Having a Mouse class is generally a sign of Mouse-related data.

Now go dogpile on someone else.


Gee, if you'd actually done your research you'd realize that the mouse related functionality in SlimDX is simply a wrapper for DirectInput, and in DirectInput there is no way to deduce the absolute mouse position because mouse data is all relative to its last position. There isn't even an actual Mouse class in SlimDX. It's a generic Device class that accepts a MouseState struct. If the SlimDX group were for some reason to implement this, it would no doubt simply reference Cursor.Position internally, thus be completely redundant.

Does it bug you that much that you have to get all snooty to us because you have to use Cursor.Position instead of a property that should not even really be inside the MouseState struct?

If you're writing anything using the .NET framework, you should feel no worries using a property from a critical component of the .NET framework. That's what it's there for.

I apologize if I sound irate, but there's really no reason for this to be an issue.

[Edited by - Flimflam on September 25, 2009 12:16:43 AM]

This topic is closed to new replies.

Advertisement