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
How to disable 3Dmouse in previous View and enable in active
Moderator: Moderators
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
In other words you will need to handle the data routing.
Markus
How to disable 3Dmouse in previous View and enable in curren
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.
How do I attach a zip file of the code here?
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.