Windows-"ping" with accelerator keys

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Windows-"ping" with accelerator keys

#1 Post by Tom »

Hi, Roger.

Some of my customers complain about the Windows-"ping"-sound with accelerator keys/shortcuts using the "ALT" key. If there is a menu item or a pushbutton with something like "ACCELKEY xbeK_ALT_K", Windows plays the standard "ping" sound (event not recognized/handled). It looks like DC_XbpDialog misses a ShortCutHandler (xppw32\source\samples\solution\shortcut). This leads to a recognition of the key stroke, but Windows does not know about the event handled - and plays the sound, even if the event was handled correctly.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Windows-"ping" with accelerator keys

#2 Post by rdonnay »

I will look into this. Thanks.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Windows-"ping" with accelerator keys

#3 Post by rdonnay »

Tom -

How do I get the "ping" sound?

Code: Select all

FUNCTION Main()

LOCAL GetList[0]

@ 0,0 DCPUSHBUTTON CAPTION 'Test' SIZE 10,2 ACCELKEY xbeK_ALT_K ACTION {||Msgbox('test')}

DCREAD GUI FIT ADDBUTTONS

RETURN nil

PROC appsys ; return
The eXpress train is coming - and it has more cars.

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Windows-"ping" with accelerator keys

#4 Post by bwolfsohn »

Roger, i'm going to guess that this may have to do with the german version of windows/xbase++, and not the US version.
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Windows-"ping" with accelerator keys

#5 Post by Tom »

Try this:

Code: Select all

FUNCTION Main()

LOCAL GetList[0], oMenu, oFileMenu

DCMENUBAR oMenu
DCSUBMENU oFileMenu PROMPT "Test" PARENT oMenu
DCMENUITEM 'Test' PARENT oFileMenu ACTION {||DoNothing()} ACCELKEY xbeK_ALT_M

@ 0,0 DCPUSHBUTTON CAPTION 'Test' SIZE 10,2 ACCELKEY xbeK_ALT_K ACTION {||DoNothing()}

DCREAD GUI FIT ADDBUTTONS

RETURN nil

PROC appsys ; return

PROC DoNothing() ; return
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Windows-"ping" with accelerator keys

#6 Post by Tom »

@Brian: This has nothing to do with german/US-versions. Roger's sample does not "ping" at my place. It starts pinging if the action connected does not create a windows output or starts a new thread.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Windows-"ping" with accelerator keys

#7 Post by rdonnay »

Ok, I see now. I still am not sure what I need to do to use the shortcut manager class.
It appears that I need to hook to the keyboard callback of the menu but the sample doesn't show anything about menus. Also, I'm not sure what function the shortcut manager is supposed to perform. Is all of this only to get rid of pings?

It appears that Microsoft added this as a feature, to let users know that an action occurred when they pressed the hot key.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Windows-"ping" with accelerator keys

#8 Post by Tom »

Hi, Roger.

If you find the time, take a look at the last message of this thread in the "german xbase forum":

http://www.xbaseforum.de/viewtopic.php? ... cutmanager
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Windows-"ping" with accelerator keys

#9 Post by c-tec »

Hello,
also in a get with a popup if you press CTRL+ENTER instead of the button right of the get
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

Post Reply