(Mis)using SiSetUiMode ?

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

Moderator: Moderators

Post Reply
Flat
Posts: 7
Joined: Wed Sep 07, 2011 1:08 am
Location: France

(Mis)using SiSetUiMode ?

Post by Flat »

Hi all,

I would like to get permanently rid of the popup menu appearing when pressing left button of my Space Navigator mouse while my application is running, and I'd like to disable this menu programmatically, from within the application. I want to use the left button in my application, and this menu doesn't allow to capture events for this button...

I've tried to call SiSetUiMode with SI_UI_NO_CONTROLS, but it doesn't seem to do anything...
Am I misusing this call ? Is the call only to be used to display/remove the popup, or to allow/inhibit it ?

And a side question about this routine. The doc says to call SiSetUiMode before calling SiOpen, but as SiOpen returns the device handle that has to be given to SiSetUiMode, the device handle is only available after the call to SiOpen... I'm a bit puzzled :?
In the demo programs, the SetUiMode is called before SiOpen, and the device handle is uninitialized at the time of call to SetUiMode...

Thanks for any light.
François
jwick
Moderator
Moderator
Posts: 3340
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

The button is being processed by the driver. Your application is never getting the event. You have to edit the configuration used when your application is in focus to redirect the button to your app, or just unassign it.
rafal
Posts: 1
Joined: Sat Jun 23, 2012 1:49 pm

Re: (Mis)using SiSetUiMode ?

Post by rafal »

Hi,
DirectX in fullscreen mode can react dramatically to any gui popup.
it would be handy to be able to disable/enable the driver popup when switching the fullscreen on/off.
Alternativelly app could be informed by event _before_ so it could switch from fullscreen to windowed mode.
montysan
Posts: 4
Joined: Thu Jan 24, 2013 2:53 am

Re: (Mis)using SiSetUiMode ?

Post by montysan »

I've also noticed the "The doc says to call SiSetUiMode before calling SiOpen", and the fact that calling it seems to do nothing at all. Is this just some code that doesn't work any more, or is it just failing to work on my device?
jwick
Moderator
Moderator
Posts: 3340
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: (Mis)using SiSetUiMode ?

Post by jwick »

The doc's wrong. It has to be called after SiOpen. It is best to not call it all together. It should be a user preference to have the GUI up or not.
montysan
Posts: 4
Joined: Thu Jan 24, 2013 2:53 am

Re: (Mis)using SiSetUiMode ?

Post by montysan »

Ok, I'll just not use it. Thanks for the reply!
Post Reply