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;
}

Cookie consent

Cookies could be used by BCGSoft.com for analytical purposes. We must request that you accept them. Cookies are used on our website to enhance browsing experience and personalize it for you. Cookies are necessary in some circumstances for the site to operate properly. By using this website, you consent to the usage of cookies. Find out more details on BCGSoft Privacy Statement and Terms of Use.

I understand and accept it