参见 BCG自带实例
CDynamicMenuApp
"This sample illustrates how a popup menu and a menu bar can be changed on the fly.\r\n\r\n"
"The following features are available:\r\n"
"* insert two dynamic menu items under the 'Edit' menu (see CMainFrame::OnShowPopupMenu)\r\n"
"* insert dynamic popup menu 'DynamicMenu' into the top-level menu bar\r\n"
"* draw an image on a dynamic menu item\r\n\r\n"
"The project was generated by BCGPApplicationWizard\r\n"
"Please note //----Exmaple----// comments in the example source code\r\n"
"CMyMenyBar class was added in order to demonstrate how to change the top-level menu bar";