От: | Scud | ||
Дата: | 24.06.03 12:45 | ||
Оценка: |
WebBand is able to get around the keystroke issues that are most commonly
associated with hosting the WebBrowser control in an Explorer band. These
keystroke issues often cause problems with the backspace and delete keys
when focus is set to an edit box by clicking on it with the left mouse
button. These problems are caused by focus problems. The problem is usually
that Internet Explorer does not know that the band currently has the focus.
In order to alleviate these problems, WebBand implements IOleControlSite.
In the IOleControlSite::OnFocus method, the WebBrowser's
IInputObjectSite::OnFocusChangesIS must be called to tell the WebBrowser
that WebBand now has the focus.
Whenever a key is pressed, three things occur:
1. WebBand's IInputObject::HasFocusIO method is called to see if WebBand
currently has the focus.
2. The IInputObject::UIActivateIO method is called to tell WebBand
that is being activated.
3. The IInputObject::TranslateAccelerator method is called. It is here
that WebBand passes the keystroke to the hosted WebBrowser control.
This causes accelerator keys such as backspace and delete to be
processed.