LoadBarState assert fails when restoring two or more floating toolbars (232845)
The information in this article applies to:
- The Microsoft Active Template Library (ATL) 3.0, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q232845 Note Microsoft Visual C++ NET (2002) supported both the managed code
model that is provided by the .NET Framework and the unmanaged native Windows
code model. The information in this article applies to unmanaged Visual C++
code only. SYMPTOMS An application may cause an assertion failure while
restoring settings for two or more floating toolbars by using the LoadBarState method of CToolbar class. CAUSE This problem occurs when two or more floating toolbars have
the same child window ID. If you do not specify a toolbar's child window ID as
the last parameter to CToolBar::Create or CToolBar::CreateEx methods, it
defaults to AFX_IDW_TOOLBAR. RESOLUTION Pass a unique control ID while calling Create or CreateEx for each toolbar, and then change the profile name in the LoadBarState and SaveBarState calls.STATUS
This behavior is by design.REFERENCES
Modification Type: | Major | Last Reviewed: | 4/22/2005 |
---|
Keywords: | kbhowto kbMFCCtrlBar kbprb kbToolbar KB232845 kbAudDeveloper |
---|
|