M
Mike
I am using CFormView and CWinFormsControl in C++ to show a C# control.
The control includes a toolstrip container and various toolstrips. If
all the toolstrips are hidden (visible = false) on any of the
container's panels, a mouse click will cause a stack overflow.
The problem is in the PreTranslateMessage() function of CFormView. It
calls _AfxNextControl. When that function tries to get the parent of
the hidden toolstrip, it gets null which throws it into an infinite
loop. If the toolstrip is visible, the correct parent is retrieved and
all works well.
Does anybody know how to fix this so the correct parent is returned?
Thanks,
Mike
The control includes a toolstrip container and various toolstrips. If
all the toolstrips are hidden (visible = false) on any of the
container's panels, a mouse click will cause a stack overflow.
The problem is in the PreTranslateMessage() function of CFormView. It
calls _AfxNextControl. When that function tries to get the parent of
the hidden toolstrip, it gets null which throws it into an infinite
loop. If the toolstrip is visible, the correct parent is retrieved and
all works well.
Does anybody know how to fix this so the correct parent is returned?
Thanks,
Mike