Re: accelerator calling member function twice

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rick Ruhl (ricker_at_cssincorp.com)
Date: 12/20/04


Date: Mon, 20 Dec 2004 17:45:15 -0600

The function is being called with the the ON_COMMAND macro.

ON_COMMAND(ID_TNC_LOCKCWSPEED, OnTncLockcwspeed)

All I did was add the Accelerator to the accelerator table in VC++ and let
Windows and the compiler do the rest.

And no, it's not being handled anywhere else.

"Tom Serface" <tserface@msn.com> wrote in message
news:%23lirp$t5EHA.3504@TK2MSFTNGP12.phx.gbl...
> Are you handling the key in any other method like a PreTranslateMessage,
> or one of the key down or up calls?
>
> Tom
>
> "Rick Ruhl" <ricker@cssincorp.com> wrote in message
> news:%23Z8%23GRt5EHA.2592@TK2MSFTNGP09.phx.gbl...
>> I've defined a accelerator key on a menu item.
>>
>> When i'm selecting the command, with the menu, it works correctly and the
>> method is only called once.
>>
>> When i'm using the shortcut, my handler method is called twice
>>
>> I've tried using different accelerator keys with no success.
>>
>> Ideas please?
>>
>> Rick
>>
>>
>
>



Relevant Pages

  • Re: Is it possible to add
    ... This is impossible in plain-vanilla Matlab. ... So let's first get the Java ... So let's modify the default File/Save accelerator ... automatically to reflect the new keyboard accelerator key. ...
    (comp.soft-sys.matlab)
  • Re: How to get Acceleration Key for specific MenuItem ?
    ... If the accelerator you want is the underlined letter, ... do this with GetMenuItemInfo (assuming the menu's not in your app). ... look in the string for a single & character, and the next character is the ... accelerator key. ...
    (microsoft.public.vb.winapi)
  • Re: Printable character as JMenuItem accelerator not properly consumed
    ... than code snippets. ... ("printable" key used as JMenu accelerator not consumed) ... Is there any way programmatically consume the ...
    (comp.lang.java.gui)
  • Removing an accelerator from a menu
    ... generate it I assign an accelerator key to the first file in the list. ... Bob Lipman ...
    (comp.lang.tcl)
  • acclerator key with input element
    ... I use form and input elements just to create an navigation ... Now, for accessibility, I provide an accelerator key for it so ... how can one distinguish the first letter of the ...
    (comp.infosystems.www.authoring.html)