diox8tony
diox8tony

Reputation: 346

MFC Windows Menu, customizing

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.

Upvotes: 1

Views: 922

Answers (1)

Marius Bancila
Marius Bancila

Reputation: 16328

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.

Upvotes: 3

Related Questions