Click here to Skip to main content
15,900,907 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Devs,

I have an MDI MFC application, I have one child frame window. I have added a caption on title bar by custom paining. its a icon that I have added in titlebar, that icon is treated as button. I need to show tooltip on this button.


How can I do this.I am looking how can I do in MDI based application in MFC specially with custom caption in titlebar where I need to pass Rect parameter of Icon on which I want tooltip.

Please help.

I am aware of CTooltip class and know how to use for dialog based application.
I understand that I need to call CToolTipCtrl::RelayEvent( lpMsg)in PreTranslateMessage like below.

CAboutDialog::PreTranslateMessage(MSG* pMsg)
{
if (NULL != m_pToolTip)
m_pToolTip->RelayEvent(pMsg);

return CDialog::PreTranslateMessage(pMsg);
}



I am not sure how and where I need to write above code in MDI application.

Regards,
Joy

What I have tried:

I am not sure how can I display tooltip on MDI based application in MFC. I do know how can I display tooltip in dialog based application.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900