Click here to Skip to main content
15,844,387 members
Please Sign up or sign in to vote.
3.33/5 (3 votes)
See more:
Hi guys, i am in MFC Project in which am using MFC Ribbon Controls. My problem is i need add a CMFCRibbonButton into the CMFCRibbonStatusBar. CMFCRibbonButton contains image.

C++
Mainframe.cpp
//////////////////////////////////////////
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
......
m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE1, strTitlePane1, TRUE), strTitlePane1);

m_wndStatusBar.AddExtendedElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE2, strTitlePane2, TRUE), strTitlePane2);

m_wndStatusBar.AddElement(new CMFCRibbonButton(IDB_TEST, _T("Test"), 22, -1), _T("Text")); // here the button added into statusbar without small image
}
;



i dont know what's wrong, if you know explain me how to a button with image in CMFCRibbonStatusBar

Thanks in advance
ganesh_IT
Posted
Updated 11-Aug-22 4:12am
v2

1 solution

go thru this link


[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900