Bug fix for crash caused by keystroke before mouse click in IE control

Ken Seehart ken at seehart.com
Wed Nov 21 21:03:16 PST 2007


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 =3D=3D WM_KEYDOWN){
*>>>*      *if (m_window->m_oleInPlaceActiveObject.Ok()) { *    =

        HRESULT result =3D =

m_oleInPlaceActiveObject->TranslateAccelerator(msg);xxx
        return (result =3D=3D 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20071121/751=
3eeb2/attachment.htm


More information about the wx-users mailing list