Hi all,
What is the preferred way to add images to a standard Windows 7 menu in a MFC application (using VS2008)? The various API's for menus are really confusing, and everything about menus and commands in MFC applications seem to be about using dockable menu bars, instead of the standard HMENU
wrapped in a CMenu
, and for various reasons we can't use a dockable menu bar. Using a hbmpItem
in calls to SetMenuItemInfo
manually for each command works, but seems like inventing the wheel all over again.
Thanks
/M
[EDIT]:
Clarification: If we use a dockable menu bar such as CMFCMenuBar
, the images for commands on toolbars are added automatically to the menu commands. For various reasons, we cannot use a docking menu bar, but are stuck with the standard Windows (non-MFC) HMENU
-style menu. Now, there ought to be a smart way to add the images from the toolbars to the HMENU
-style menus also, smarter than manually calling SetMenuItemInfo
for each command.
(Yes, I've actually heard of this thing called Google. And, if you can't come up with anything better than "The answer is on the Internet", please refrain from responding.)