Tooltips in a FormView

Hi,

I have a VC2005 (MFC) SDI application where I switch between formviews. I am having trouble getting tool tips to work inside the formview.

In my formview class I added this code to try and get tool tips to work.

In msg map: ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)

BOOL CMyFormView::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult)
{

//.....................code in here etc etc etc

}

In Oninitialupdate I call, EnableToolTips(TRUE);

I have editted the string resources also.

MY PROBLEM is, there are 4 buttons want to display tooltips for, and yet a tooltip only appears for 1 of the 4 buttons. When I put a break point in the OnToolTipNotify function the function is only entered when I hover above one of the four buttons, when shorely it should be entered when I hover above any of the 4 buttons. I spent about a day trying to get it to work but I couldn't.

As a different approach I also tried to get tool tips to work by using the simple class - CToolTipCtrl, but I didnt have any luck with that at all.

Can anyone offer me any help as to why tooltips are not working in my cformview?

Thanks.

[1203 byte] By [NuclearChicken] at [2007-12-28]
# 1

I'll make my question simplier. Has anyone ever got tooltips to work properly in a formview (without doing anything nasty like embedding a toolbar in the formview) ?

I reacon theres a bug in MFC stopping it working properly.

Can anyone suggest any web sites with examples (I've spent hours searching with google and had no luck).

NuclearChicken at 2007-9-4 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2

Hello

Re: Tooltips in a FormView

You have probably gotten no responses to your question as the scope is a little off topic for this Forum. The more appropriate place for your question is probably the MFC newsgroup: http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.vc.mfc&lang=en&cr=US

OTP

Thanks

Damien

DamienWatkins-MSFT at 2007-9-4 > top of Msdn Tech,Visual C++,Visual C++ General...