I have an example of MDI app, where I tried to save and then restore a MDI tab group. And the example id from microsoft: RibbonMDIDemo ... but simply not working:
Code:
	CCommandLineInfo cmdInfo;
	ParseCommandLine(cmdInfo);

	OnFileNew();
	OnFileNew();
	OnFileNew();
	OnFileNew();

	if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
	{
		if (! pMainFrame->LoadMDIState(GetRegSectionPath()))
		{
			if (! ProcessShellCommand(cmdInfo))
				return FALSE;
		}
	}
	else
	{
		// Dispatch commands specified on the command line
		if (! ProcessShellCommand(cmdInfo))
			return FALSE;
	}
and
Code:
BOOL CRibbonMDIDemoApp::SaveAllModified()
{
	if (!CWinAppEx::SaveAllModified ())
	{
		return FALSE;
	}

	CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST (CMDIFrameWndEx, m_pMainWnd);
	if (pMainFrame != NULL)
	{
		pMainFrame->SaveMDIState(GetRegSectionPath ());
	}

	return TRUE;
}
now, if I move some view in another tab group, and when I close the app, why this secnod tab group is not saved ? I attach the demo project, which is from microsoft in fact: RibbonMDI.zip