views:

261

answers:

1

I am hosting a web browser control, and I don't know how to fetch hotkeys such as [F1] when the control has focus.

My primary need is displaying custom help when the user presses F1, however, generally being able to provide additionla shortcuts would be nice.

(additional information is available at my related question - I hope it was the right choice to open a second question - I guess the solutions aren't related.)

A: 

Nothing simpler; your ActiveX control should have essentially a WINPROC in it. It may be hidden by a BEGIN_MESSAGE_MAP macro list, but it's there if you have a window.

Simply handle the windows message events (i.e. WM_KEYPRESS) in the WINPROC and you're set.

Taxilian
They keyboard event seems to be caught by the Browser control I am hosting.
peterchen