I get a crash in wxIEHtmlWindow when I type a character after the
window gets focus (without a mouse click).
I found this related comment:
Until such time as wxWidgets gets fixed, does anyone have an idea of a
workaround? Are there any javascipt or AxtiveX tricks that would cause
the active object to get set to something?
Ken Seehart
This is a copy of what I sent to in which
I propose a fix.
···
I don’t have time to get into the
development process, however here is
a patch that somebody needs to implement:xactivex.cpp:
`bool wxActiveX::MSWTranslateMessage(WXMSG *msg){
if (msg->message == WM_KEYDOWN){
>>> if
(m_window->m_oleInPlaceActiveObject.Ok()) {
HRESULT result =
m_oleInPlaceActiveObject->TranslateAccelerator(msg);xxx
return (result == S_OK);
>>> }
}return wxWindow::MSWTranslateMessage(msg);
}
`
This will fix the crash that occurs if a character arrives at an
IEActiveX control before any mouse click. Usually the user clicks on a
window before typing, but it is possible for a window to get focus by
various means without a mouse click, in which case a keystroke will
cause an annoying crash.The
**m_window->m_oleInPlaceActiveObject.Ok()**
test is used everywhere else in the code to make sure that**m_oleInPlaceActiveObject**
is a valid
pointer. This is the one exception.Ken Seehart