Jump to content
  • Advertisement
Sign in to follow this  
Bacterius

SlimDX and Multipoint

This topic is 2538 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

I'm trying to use the Multipoint SDK in a SlimDX project for a multi-mouse game I'm making, but I'm having a little problem which I can't figure out how to solve. To initialize the Multipoint SDK, you apparently need a System.Windows.Window object (probably to get a handle to override mouse messages, I suppose). The problem is that I'm using a RenderForm instead as a window for my own DirectX drawing code, and while I can get the handle of this RenderForm, I don't know how to "cast" it to a System.Windows.Window object to be able to initialize Multipoint. Does anyone know how I could do this? Or do I have to create a "dummy" form used just to handle the mouse messages?

Thanks for your input everyone.

Share this post


Link to post
Share on other sites
Advertisement

Your problem is that "The MultiPoint Mouse SDK does not support Windows Forms UI development."

This means you either need to persuade SlimDX to work with WPF or to have two separate windows and somehow make them work together so that one handles the mice, and the other rendering.

Ah, I see. Hmm I think I'll try and look for another library that will do the job, Multipoint seems a bit overkill for what I'm trying to do anyway, I just need control over two mice without all the bells and whistles, and it seems too much like a hack trying to get SlimDX to work like you describe.

For instance this seems promising, even though it's made for XNA it actually asks for a handle during its initialization which I do have available in the RenderForm properties, I'll give it a shot tomorrow.

Thanks for your reply Adam.

Share this post


Link to post
Share on other sites

[quote name='Adam_42' timestamp='1318254304' post='4871061']
Your problem is that "The MultiPoint Mouse SDK does not support Windows Forms UI development."

This means you either need to persuade SlimDX to work with WPF or to have two separate windows and somehow make them work together so that one handles the mice, and the other rendering.

Ah, I see. Hmm I think I'll try and look for another library that will do the job, Multipoint seems a bit overkill for what I'm trying to do anyway, I just need control over two mice without all the bells and whistles, and it seems too much like a hack trying to get SlimDX to work like you describe.

For instance this seems promising, even though it's made for XNA it actually asks for a handle during its initialization which I do have available in the RenderForm properties, I'll give it a shot tomorrow.

Thanks for your reply Adam.
[/quote]

When I saw this thread I was thinking of that link you just posted. You should be able to replicate (although probably not necessary, since it doesn't really need anything XNA - like you said, just a window handle). I believe that was done with RawInput, which SlimDX does expose.

Share this post


Link to post
Share on other sites

[quote name='Bacterius' timestamp='1318258415' post='4871079']
[quote name='Adam_42' timestamp='1318254304' post='4871061']
Your problem is that "The MultiPoint Mouse SDK does not support Windows Forms UI development."

This means you either need to persuade SlimDX to work with WPF or to have two separate windows and somehow make them work together so that one handles the mice, and the other rendering.

Ah, I see. Hmm I think I'll try and look for another library that will do the job, Multipoint seems a bit overkill for what I'm trying to do anyway, I just need control over two mice without all the bells and whistles, and it seems too much like a hack trying to get SlimDX to work like you describe.

For instance this seems promising, even though it's made for XNA it actually asks for a handle during its initialization which I do have available in the RenderForm properties, I'll give it a shot tomorrow.

Thanks for your reply Adam.
[/quote]

When I saw this thread I was thinking of that link you just posted. You should be able to replicate (although probably not necessary, since it doesn't really need anything XNA - like you said, just a window handle). I believe that was done with RawInput, which SlimDX does expose.
[/quote]

It works! Although it is a bit awkward to use with a messagepump (stutters a bit), it works. I think I'll be rewriting it using SlimDX's RawInput anyway because I'd like my application to work under x64 as well, and I like to be dependent of the least amount of external code possible. Thanks for your help everyone!


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!