BCGSoft > Products > Product feature tour

Product feature tour

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

Menu Tooltips

The library provides an easy way to show tooltips for the specific menu items.
Sample code:
BOOL CMainFrame::OnMenuButtonToolHitTest (CBCGToolbarButton* pButton, TOOLINFO* pTI)
{
    ASSERT_VALID (pButton);
    ASSERT (pTI != NULL);
    
    if (pButton->m_nID == ID_OF_COMMAND)
    {
        // Show tooltip "My tooltip" for the menu item with ID = ID_OF_COMMAND:
        CString strText = _T("My tooltip");

        pTI->lpszText = (LPTSTR) ::calloc ((strText.GetLength () + 1), sizeof (TCHAR));
        _tcscpy (pTI->lpszText, strText);

        return TRUE;
    }

    return FALSE;
}
Prev  Next