I am working with a multiple top level windows application. The main window is a MDIFrameWnd, I put some code in CWinApp to switch m_pMainWnd when switch top level window. It's work fine but fire a assert when I close one of the main window. This assert is from CMDIChildWnd:
void CMDIChildWnd::AssertValid() const
{
CFrameWnd::AssertValid();
ASSERT(m_hMenuShared == NULL || ::IsMenu(m_hMenuShared));
}
It look like the window be closed release the shared menu. I try to find out where the menu is released in MFC framework, but can not find it. Could somebody help me? Thanks..