1
votes

I can't find where in MFC the individual View/Document/Frame names are added to the "Window" menu.

CMDIFrameWndEx::GetWindowMenuPopup searches the top level Menu for ID_'s related to the "Windows" menu. and returns this sub menu. But it doesn't modify anything.

I guess I could override this function to return my own HMENU that I handle directly. But I really, would like to know which function in MFC adds the items to this "Window" menu.

1

1 Answers

3
votes

The menu is updated in the CFrameWnd::OnUpdateFrameMenu. This was an undocumented method, but that changed when CFrameWndEx was added to MFC.

This might also be of interest: How to Use Multiple Menus in MFC App That Uses GetDefaultMenu.