Results 1 to 2 of 2

Thread: MdiAdv sample VS2008 bug

  1. #1
    Junior Member
    Join Date
    Apr 2010

    MdiAdv sample VS2008 bug

    In VS2008, the MdiAdv sample (under Samples\Toolkit\MFC\Docking\MenuBar) has a problem where the MDI windows do not show up in the Window menu. I think the problem is related to a recent change to GetMenu() in MFC where it is now declared as a virtual function. So, in SECMDIFrameWnd::UpdateWindowMenu() calls SECMDIFrameWnd::GetMenu() instead of CWnd::GetMenu(). This prevents WM_MDISETMENU from being called.

    The current workaround is to override UpdateWindowMenu() in MainFrame.cpp with the following change:

    if(AfxGetMainWnd()->GetMenu() == NULL)

    CMenu *pMenu = AfxGetMainWnd()->CWnd::GetMenu();
    if(pMenu == NULL)

  2. #2
    Junior Member
    Join Date
    Mar 2008

    Re: MdiAdv sample VS2008 bug

    Thank you for sharing your insights with us, ttnakada!
    Rogue Wave Stingray developers will review this override.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts