本文共 879 字,大约阅读时间需要 2 分钟。
可以尝试转换成CMenu指针。
CMFCMenuBar m_wndMenuBar;
CMenu *mainMenu = CMenu::FromHandle(m_wndMenuBar.GetDefaultMenu());
需要注意的是,您对mainMenu进行完您想要的操作后,需要调用m_wndMenuBar.CreateFromMenu(mainMenu->GetSafeHmenu, TRUE, TRUE);来将变化反映到m_wndMenuBar里面去。
此外,这些是第三方网站,对于CMFCMenuBar加载菜单的一些讨论,也许对您的问题有所帮助。
1.
2.
This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
转载地址:http://xenws.baihongyu.com/