FIX: Internal State of ControlBars Corrupted (151446)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
This article was previously published under Q151446 SYMPTOMS
The internal state of the controlbars is corrupted when controlbars are
docked and undocked. The size of the Registry key or the .INI file grows
when SaveBarState is a result of this corruption.
CAUSE
The code for managing the controlbar docking and undocking has a bug which
does not correctly remove information from the data structures. None of
this code can be overridden to fix the bug because it is undocumented
private implementation of the MFC.
RESOLUTION
The sample code at the end of this article cleans up the state of these
internal structures. The CleanUpControlBarState function cleans up the
information in the CDockState object passed to it. When the function
returns, the CDockState object has the clean information.
Call this function with the present state of the controlbars, and use the
information after calling CleanUpControlBarState.
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++ 32-
bit Edition version 4.2.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbBug kbfix kbNoUpdate kbToolbar KbUIDesign kbVC420fix KB151446 |
---|
|