Home > Software engineering >  The great god, CMFCMenuBar consult and CMFCToolBar problem..
The great god, CMFCMenuBar consult and CMFCToolBar problem..

Time:09-22

CMFCMenuBar how to give a child a menu item associated images?
CMFCToolBar when created, load the custom toolbar, and then how to give toolbar related pictures?

CodePudding user response:

The great god, help me,,

CodePudding user response:

SetMenuItemBitmaps

The toolbar can add resource directly

CodePudding user response:

refer to the second floor zhao3132453 response:
SetMenuItemBitmaps

Toolbar can directly add resources

HMENU HMENU=m_wndMenuBar. GetHMenu ();
CMenu * pMenu=CMenu: : FromHandle (hmenu);
CBitmap BMP.
BMP. LoadBitmap (IDB_BITMAPCMD1);
//pMenu - & gt; GetSubMenu (1) - & gt; SetMenuItemBitmaps (0, MF_BYPOSITION, & amp; BMP, & amp; BMP);
PMenu - & gt; SetMenuItemBitmaps (ID_32802 MF_BYCOMMAND, & amp; BMP, & amp; BMP);
BMP. Detach ();
Write as if the corresponding menu item or no pictures?

CodePudding user response:

BMP member variables to try

CodePudding user response:

reference 4 floor zhao3132453 response:
BMP member variables to test under

Thank you, still won't do,
  • Related