0

In MFC featurepack i create a standard menu and set the ID of sub menu to the same command of toolbar button to take that button's image that toolbar is the one sent to this method

CMFCToolBar::AddToolBarForImageCollection

and also I use the

GetContextMenuManager()->AddMenu(L"Mymenu", IDR_ContextMenu1);

in the application and

theApp.GetContextMenuManager()->ShowPopupMenu(IDR_ContextMenu1,rect.left,rect.top,button);

in the show menu event

I need to know how to add a menu item with a specified icon at the run-time dynamically

ahmedsafan86
  • 1,776
  • 1
  • 26
  • 49

1 Answers1

0

See the documentation about OnInitMenuPopup of your CMainFrame.

sergiol
  • 4,122
  • 4
  • 47
  • 81