The information in this article applies to:
SYMPTOMSWhen 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:
CAUSEWhen 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. RESOLUTIONThe 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. STATUSMicrosoft 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. MORE INFORMATION
The MFC framework creates OLE controls placed on a dialog template
resource, if any, by calling COccManager::CreateDlgControls. This function
in turn makes a call to COccManager::CreateDlgControl to create a specific
OLE control. The code present in CreateDlgControl attempts to setup the tab
order of each OLE control after it is created, for which it calls
CWnd::SetWindowPos, passing in the handle of the window that the control
will be inserted after (in the code, this window is referred to as
pWndAfter).
Steps to Reproduce the Assertion FailureCreate a dialog-based control container application, and place the following controls with the specified tab order in its main dialog template resource:
Additional query words: kbVC400bug ocx ole control cdk 4.00 4.10
Keywords : kbole kbCtrl kbMFC kbVC kbVC410fix |
Last Reviewed: July 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |