BCGSoft > Products > Product feature tour

Product feature tour

Context | First | Prev | Next | Last
Fully implemented BCGControlBar Pro (MFC)
Not available BCGSuite (MFC)
Fully implemented BCGControlBar (Microsoft .NET)

"Owner-draw" menu images

The library allows to draw user-defined images left to the menu item text.

Sample code:
BOOL CMainFrame::OnDrawMenuImage (CDC* pDC,
                                const CBCGToolbarMenuButton* 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
}
Prev  Next