Page 1 of 1

DESIGN HOTKEY in dc_GetOptDefaults

Posted: Wed Feb 07, 2018 5:55 am
by reganc
A long time ago I asked about an error we were having in our application when the key Alt-D was pressed.

I never got around to getting a microphone / headphones combo to do a TeamViewer session with Roger, so this problem remained.

I received a request today to look into this again (I guess more users are using hotkeys these days...) as the Alt-D is also a menu shortcut and using it causes the issue to occur.

What seems to happen is that, even if I do not specify a DESIGN HOTKEY clause in our system, there is a default one set in the dc_GetOptDefaults array and because of that the DCREAD handler intercepts it and tries to call dc_designhandler. This works the first time Alt-D is pressed but pressing Alt-D again causes an error for some reason.

But I didn't want the design handler to be available at all.

Has anyone seen this problem? Or has it been fixed in a later eXpress++ version and I've missed it?

I fixed it by setting the nGETOPT_DESIGNKEY array element to 0 (I could not set it to NIL) in the array returned by dc_GetOptDefaults() at the start of our application.

Re: DESIGN HOTKEY in dc_GetOptDefaults

Posted: Wed Feb 07, 2018 7:01 am
by skiman
Hi Regan,

I think your need DC_DotHotKey(0).

Re: DESIGN HOTKEY in dc_GetOptDefaults

Posted: Wed Feb 07, 2018 7:54 am
by reganc
skiman wrote:Hi Regan,

I think your need DC_DotHotKey(0).
That has been at the top of my application for ages and it makes no difference.
Only the fix I have mentioned works.

I'm just not entirely sure if it's the right thing to do to set the hotkey to ZERO.

Re: DESIGN HOTKEY in dc_GetOptDefaults

Posted: Wed Feb 07, 2018 8:53 am
by rdonnay
Regan -

What build of eXpress++ are you using?
I don't understand how the DESIGN system can come up if you don't set DESIGN mode in DCGETOPTIONS.

We should have a Teamviewer session on this.

Re: DESIGN HOTKEY in dc_GetOptDefaults

Posted: Thu Feb 08, 2018 3:16 am
by reganc
rdonnay wrote:Regan -

What build of eXpress++ are you using?
I don't understand how the DESIGN system can come up if you don't set DESIGN mode in DCGETOPTIONS.

We should have a Teamviewer session on this.
I am using eXPress++ (c) Version 2.0 Build 262. I had problems using Build 265 so had to go back and haven't had a chance to sort it out yet.

But before we go down the TeamViewer road, here's a small test program.

Could you run it and see what happens on your system? I have attached the 2 screens I see when I press Alt-D in the test program.

Re: DESIGN HOTKEY in dc_GetOptDefaults

Posted: Thu Feb 08, 2018 10:29 am
by rdonnay
Your sample works exactly as it should.

Alt-D only invokes DC_Dot() window.

I'm afraid that we will need to connect via Teamviewer so I can see why this is happening for you but not for anyone else.