Owner-draw Menu Images
BCGControlBar Pro (MFC)
BCGSuite (MFC)
BCGControlBar for .NET
The library allows to draw user-defined images left to the menu item text.
Menu items with owner-draw images:
Sample code:
BOOL CMainFrame::OnDrawMenuImage(CDC* pDC,
const CBCGPToolbarMenuButton* pMenuButton,
const CRect& rectImage)
{
ASSERT_VALID (pDC);
ASSERT_VALID (pMenuButton);
if (pMenuButton->m_nID == ID_OF_COMMAND)
{
// Draw inside rectImage using pDC
return TRUE;
}
return FALSE; // Default drawing
}