MFC support for auto hiding menus
MFC 9.0 has support for the automaticall and manual hiding of menus. To enable that, SetMenuBarVisibility must be called. This method of class CFrameWnd requires AFX_MBV_DISPLAYONFOCUS to be passed in order to hide the menu automatically and show it only when pressing the ALT key.
However, this only works in SDI applications. In an MDI application calling that for the child frame (derived from CMDIChildWnd) does not have any effect. Trying to call the method with any other parameter than AFX_MBV_KEEPVISIBLE results in an assertion failure, because the mothod is overriden in CMDIFrameWnd:
voidCMDIFrameWnd::SetMenuBarVisibility(DWORD dwStyle)
{
ENSURE_ARG(dwStyle== AFX_MBV_KEEPVISIBLE);
ASSERT(m_dwMenuBarVisibility== AFX_MBV_KEEPVISIBLE);
}
Why is this not working for MDI apps, and why is this not explained either in the VC++ blog (http://blogs.msdn.com/vcblog/archive/2007/03/21/mfc-updates-for-vista-common-controls.aspx) or the MSDN Magazine (http://msdn.microsoft.com/msdnmag/issues/07/06/Cpp/)?
Thank you.

