How to disable 3Dmouse in previous View and enable in active

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
Nihit
Posts: 8
Joined: Mon Oct 26, 2009 6:30 pm

How to disable 3Dmouse in previous View and enable in active

Post by Nihit »

The 3D mouse works fine in one window but when i switch to another view it still keeps working in the old one and does not switch to the new one. What do I need to do? I have hooked to OnActivateView but i am not sure what to do here for the inactive view and for the active view. For the newly active window I called


if (SUCCEEDED(hr))
_3DxSimpleDevice->Connect();
_pAtlModule->Lock();

and for the old one.

if (SUCCEEDED(hr))
_3DxSimpleDevice->Disconnect();
_pAtlModule->Unlock();

but they did not work.
There is no documentation about this. Can someone pls guide me?

Thanks,
Nihit
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Post by UtaSH »

Moving this thread to Developer Forum.
mbonk
Moderator
Moderator
Posts: 181
Joined: Mon Dec 04, 2006 4:06 am

Post by mbonk »

The device is a singleton. What should work though is adding another event sink and checking in the sink if the window is active. Connecting disconnecting simply increments, decrements the connect count on the singleton and thus has no effect.

In other words you will need to handle the data routing.

Markus
Nihit
Posts: 8
Joined: Mon Oct 26, 2009 6:30 pm

How to disable 3Dmouse in previous View and enable in curren

Post by Nihit »

I did hook to all the events just like the first window. and I notice that the hr is returned OK. but it just does not respond to any of the events for the the other Isensor handle or view.
mbonk
Moderator
Moderator
Posts: 181
Joined: Mon Dec 04, 2006 4:06 am

Post by mbonk »

Send me a simple project that demonstrates your issue
Nihit
Posts: 8
Joined: Mon Oct 26, 2009 6:30 pm

How do I attach a zip file of the code here?

Post by Nihit »

I have a small application which reproduces the problem but I am not sure how I can attach it here? I have sent an email with the application on the apisupport-win email.
Post Reply