Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disable tab to button

0 views
Skip to first unread message

mike

unread,
Apr 30, 2003, 7:18:20 PM4/30/03
to
I've written an app that attaches itself to a 3rd party program and becomes
part of that program. This 3rd party program has several buttons that I
need to control. I've sub classed the window so that I can enable and
disable buttons in the 3rd party program, but now my client wants me to keep
the end user from tabbing to and pressing the space bar or the enter key on
the button. This way they have to use the mouse to click the button.

Does anyone have any idea how I can do this?

Thanks,

Mike


Kurt Barthelmess (TeamB)

unread,
Apr 30, 2003, 7:44:01 PM4/30/03
to
"mike" <mi...@allredonline.com> wrote:

>I've written an app that attaches itself to a 3rd party program and becomes
>part of that program. This 3rd party program has several buttons that I
>need to control. I've sub classed the window so that I can enable and
>disable buttons in the 3rd party program, but now my client wants me to keep
>the end user from tabbing to and pressing the space bar or the enter key on
>the button. This way they have to use the mouse to click the button.

You might suggest to your client that this is a major "no-no" as far
as Windows is concerned. But it probably won't make any difference<g>.
Since you've subclassed the window you can probably watch for
WM_KEYDOWN messages that activate the button and not pass them on. You
can also turn off the WS_TABSTOP style (see Get/SetWindowLong) to
prevent the user from tabbing to it.

Good luck.

Kurt

0 new messages