Does anyone have any idea how I can do this?
Thanks,
Mike
>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