A while ago, I have tried to add a tooltip for testing purposes on a CMenu item. Now I would need it, and I'm facing the same issue again.
This question and answer(s):
MFC : How to add tooltip in Cmenu items?
doesn't help me at all, as this "newline magic" is simply not working.
Also, it seems like I'm not the only one having problems with it: MFC CMenu tooltip not being displayed
void CTextListCtrl::CreateMenu(void)
{
m_Menu.CreateMenu();
CMenu submenu;
submenu.CreatePopupMenu();
submenu.AppendMenuW(MF_STRING, IDC_RESEND_POPUP, L"&Resend\nShow me the tooltip");
//Other menu items...
m_Menu.AppendMenuW(MF_POPUP, reinterpret_cast<UINT_PTR>(submenu.m_hMenu), L"");
submenu.Detach();
}
The result is this:
However, increasing the letters of the text results in a bigger pop-up menu, not a menu tooltip.
I have seen the other links in this answer, and checked them and the projects. But these are not what I want.
Does someone know what I did wrong, or is there another solution/source which could be helpful ?
Edit: As I have mentioned before in a comment, here is a sample solution with minimum requirements to reproduce the problem. (See CMenuListCtrl.cpp(100)
)
Tested with VS2010 & VS2015 (same result).