简体   繁体   中英

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM