Coder's Guild Mailing List

Disabling an accelerator key in BC++5.01/OWL

Posted by Stormbringer on 1999-09-20

Hi Guys,

    I'm trying to disable a keyboard accelerator key in a project that I'm
working on.  See, this is what's happening, if you press the "control
button", "speed button", it will only be enabled until the conditions are no
longer met, and then it is no longer processed by the Response Table.  (Or
something like that) However, there is also an accelerator key, for the same
function ( using the identical function ), that is not disabled, for another
3 iterations, and then the 4th crashes the program.

ex. )

Ctrl-S is pressed and released in order to "step" a simulation ahead 1 sec.
(hold down to advance quickly)
The speed button (let's call it "306" ) can be pressed to "step" a
simulation ahead 1 sec.

Once the program is at the end of the simulation (ex. 0:19:59.0 of a
0:20:00.0) file and the speed button is pressed, the next time ( 0:20:00.0)
you try to press the button, it is disabled, however, if you try to use the
"Ctrl-S" keys to do the same, at this point, it will allow you to advance
another 3 secs, and then crash the program.  I need to stop this, but I
cannot find a command to do this ( of course if I KNEW what I was looking
for, I could likely find it by name in the borland help files! :)  )

I'm sorry I can't send code, but the company I work for would have a
collective bird (and it's NOT a pretty sight! :) ), so I guess I'll just
have to try to explain better if this is not clear.

Any input is appreciated.

Thank you all

Tammi L.
Grad 1998 - Programmer Analyst