The information in this article applies to:
SYMPTOMSDestroying a dockable CControlBar object may cause unexpected behavior. For example, an exception may be thrown that if not caught will generate a message box containing something similar to this: By using the debugger, you will likely see that this Access Violation has occurred in the function CObject::IsKindOf. CAUSE
This problem occurs because of the way toolbars are handled by the
framework. MFC implements a CDockBar object for use as the parent of
dockable control bars. To arrange the control bars docked at the location
it manages, this CDockBar object maintains a list of the CControlBar
objects that it has as children. RESOLUTION
To work around the problem, make sure that dockable toolbars are removed
from their parent CDockBar objects before destroying them. To this:
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++ version 2.1 (MFC 3.1). Additional query words: 3.00 toolbar CToolBar
Keywords : kbprg kbui kbMFC KbUIDesign kbVC |
Last Reviewed: September 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |