HMENU CMainFrame::NewMenu() { static UINT toolbars[]={ IDR_MAINFRAME, IDR_TOOLBAR1 }; // Load the menu from the resources // ****replace IDR_MENUTYPE with your menu ID**** m_menu.LoadMenu(IDR_DEMOTYPE); //菜单又变为另一个………… // One method for adding bitmaps to menu options is // through the LoadToolbars member function.This method // allows you to add all the bitmaps in a toolbar object // to menu options (if they exist). The first function // parameter is an array of toolbar id's. The second is // the number of toolbar id's. There is also a function // called LoadToolbar that just takes an id. m_menu.LoadToolbars(toolbars,2); return(m_menu.Detach()); }
HMENU CMainFrame::NewMenu()
{
static UINT toolbars[]={
IDR_MAINFRAME,
IDR_TOOLBAR1
}; // Load the menu from the resources
// ****replace IDR_MENUTYPE with your menu ID****
m_menu.LoadMenu(IDR_DEMOTYPE); //菜单又变为另一个…………
// One method for adding bitmaps to menu options is
// through the LoadToolbars member function.This method
// allows you to add all the bitmaps in a toolbar object
// to menu options (if they exist). The first function
// parameter is an array of toolbar id's. The second is
// the number of toolbar id's. There is also a function
// called LoadToolbar that just takes an id.
m_menu.LoadToolbars(toolbars,2); return(m_menu.Detach());
}