FIX: Assertion Failed Line 388 of Occmgr.cpp (143108)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
This article was previously published under Q143108 SYMPTOMS
When an MFC 4.0 control container has one or more invisible-at-run-time OLE
controls along with other OLE and non-OLE controls placed on a dialog
template, the following assertion might occur based on the tab-order of the
controls in the dialog:
Debug Assertion Failed!
Program: <app name>
File: occmgr.cpp
Line: 388
CAUSE
When the MFC framework creates an invisible-at-run-time OLE control, it is
reparented to the desktop window. This makes the control's window not a
sibling of the other windows present in the dialog. Now if this invisible-
at-run-time control has another OLE control (visible at run time) next in
tab order, then the framework places the latter OLE control at the end of
the dialog's child window list. Later when the framework attempts to find
the "next" sibling window of the OLE control (now at the end of the
dialog's child window list), it returns NULL because there is no "next"
sibling window to this OLE control.
RESOLUTION
The assertion can be safely ignored, but the tab order will probably be
incorrect. To work around this assertion, place the invisible-at-run-time
controls at the end of the tab order in the dialog template.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article. This bug was corrected in
Visual C++ 4.1.
Modification Type: | Major | Last Reviewed: | 10/24/2003 |
---|
Keywords: | kbBug kbContainer kbCtrl kbfix kbNoUpdate kbVC410fix KB143108 |
---|
|