views:

610

answers:

2

Has anyone tried using these new VS2008 MFC classes yet? I can't seem to find any examples anywhere. Even the VS2008 samples(1) don't mention these classes. (They use CToolTip.)

(1) Update: My mistake. I had downloaded the non-SP1 samples. I see that the SP1 samples have samples specifically for the 2008 Feature Pack, including the DlgToolTips and ToolTipDemo projects mentioned in an answer. Unfortunately, they don't address doc/view or CTooltipManager.

Specifically, I'm trying to display tooltips in a standard MFC view/document application where there are two side-by-side views whose parent is CSplitterWnd. I had this working pre-SP1, and I thought this'd be a good time to try the new Feature Pack tooltip classes.

Is there any way to make these things work without overriding PreTranslateMessage() and manually calling RelayEvent()? (I don't think I've seen anything in MFC as poorly designed as tooltips.)

It doesn't seem as simple as merely calling CTooltipManager::CreateToolTip() and then AddTool() on the created tip.

+1  A: 

In case you haven't seen it, there is a very brief example here

John Dibling
Thank you. I did see that, since I read the MSDN "documentation" for all of the related classes. That sample, sadly, merely shows how to call CTooltipManager::SetTooltipParams().
skst
+1  A: 

Have you looked at the DlgToolTips and ToolTipDemo sample applications? These both use classes which inherit CMFCToolTipCtrl. DlgToolTips includes code that calls RelayEvent from PreTranslateMessage, but ToolTipDemo doesn't.

ChrisN
Ah! I was mistaken when I said I'd tried the SP1 samples. I downloaded them again to check, and I must've had the non-SP1 samples. Indeed, this includes the apps you mention. That should be helpful.
skst
P.S. Unfortunately, these examples don't cover CTooltipManager nor do they help with tooltips in the doc/view architecture, especially when a CSplitterWnd is involved.
skst