PRB: Possible Recursion Problems with OLE ControlsLast reviewed: July 10, 1997Article ID: Q140492 |
4.00
WINDOWS NT
kbole kbprb
The information in this article applies to:
SYMPTOMSAttempting to use an OLE control in the same module that implements it may generate an exception caused by a stack overflow. One example of using an OLE control in this manner is placing an instance of an OLE control in that same OLE control's About dialog box.
CAUSECalling certain CWnd members can create an infinitely recursive loop, causing a stack overflow to occur.
RESOLUTIONAvoid calling certain CWnd members when using an OLE control in the same module that implements it.
STATUSThis behavior is by design.
MORE INFORMATIONThe COleControl class itself has been written to make sure that its members are safe and can be called even when a control is being used in the module that implements it. However, certain CWnd members are not safe to call when a control is being used in this fashion. CWnd members that can cause problems include ShowWindow, MoveWindow, SetWindowPos, EnableWindow, SetWindowText, GetWindowText, and GetWindowTextLength. There may be other members that can cause the same problem. If a control is being used in the same module that implements it and a stack overflow occurs, the first thing the control programmer should check for is this problem.
|
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |