Menu Tooltips

Fully implemented BCGControlBar Pro (MFC)

Not available BCGSuite (MFC)

Not available BCGControlBar for .NET

The library provides an easy way to show tooltips for the specific menu items.

Menu item with tooltip:

Menu item with tooltip:

Sample code:

BOOL CMainFrame::OnMenuButtonToolHitTest (CBCGPToolbarButton* 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;
}