Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How Can I Save position of toolbars in an MDI application?

0
Posted

How Can I Save position of toolbars in an MDI application?

0

Hello, I want to save docking position of toolbars in a MDI application and reterive it at begining of program. I used SavebarState and LoadBarState but it dose not work when I use LoadBarState before DockControlBar it gives an assertion failure then crashes due to bad pointer. CMainFrame::OnCreate(…) { … //This code crashes EnableDocking(CBRS_ALIGN_TOP); m_ToolBar1.EnableDocking(CBRS_ALIGN_ANY); m_ToolBar2.EnableDocking(CBRS_ALIGN_ANY); m_ToolBar3.EnableDocking(CBRS_ALIGN_ANY); LoadBarState(_T(“Main ToolBar Docking Position”)); DockControlBar(m_ToolBar1); DockControlBar(m_ToolBar2); DockControlBar(m_ToolBar3); } when I put LoadBarState after DockControlBar it dose not crashes or give assertion failure but position of toolbars are not the position when prgram has been closed. CMainFrame::OnCreate(…) { … //This code dose not crash but it dose not save position of toolbars EnableDocking(CBRS_ALIGN_TOP); m_ToolBar1.EnableDocking(CBRS_ALIGN_ANY); m_ToolBar2.EnableDocking(CBRS_ALIGN

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123