Click to See Complete Forum and Search --> : CToolTipCtrl in Windows 95/98


Troy T
May 8th, 1999, 09:28 PM
I need to find out why the CToolTipCtrl's tooltips are showing up behind all of my dialogs/property sheets in Windows 95 and 98. Can someone shed some light on this subject, and suggest a fix? This is rather odd as they work perfectly fine in Windows NT 4.0, and Windows 2000.
CToolTipCtrl m_Tooltip;

// In the constructor of the class I do the following:
m_Tooltip.Create(this);
m_Tooltip.Activate(TRUE);



The only thing I can think of is the "this" in the create function call, but that just specifies the parent window that the tooltip should report to. I guess I would expect the tooltip to show up behind the dialogs if I left that NULL or something, but because it has a parent window, I'm confused..

Thanks in advance..

- Troy

Dan Haddix
May 9th, 1999, 02:20 AM
OK I have this book "The MFC Answer Book" by Eugene Kain (which I highly recommend) and one of the FAQs is "How do I add ToolTips to the conrols in a form view?". While looking over the code it is very much like yours except he calls the m_Tooltip.AddTool() function to accociate the tooltip with the form controls, and he overloads the PreTranslateMessage() handler and uses m_ToolTip.RelayEvent() to allow the tooltip to handle messages before passing them to the view. I ran the sample app from the CDRom on my Windows 95 machine and the tooltips didn't seem to hide behind the form controls. Hope this helps!!!

Troy T
May 9th, 1999, 02:27 AM
Thanks for your input, but everything that you just described is the exact same code I have in my application already.. But what I really need to find out is has this ever happened to anyone, and what was the solution? I have never seen this, it's very strange. It happens only on Windows 98, Windows 95 works fine, NT is fine, and Windows 2000 is fine.. Just w98 is giving me problems with the code..

Thanks for any additional comments/suggestions anyone can offer.

- Troy

Troy T
May 9th, 1999, 09:52 PM
Can someone please suggest a fix for this? I need some insight to what is happening here, and since it only happens on Windows 98, I can't figure it out. It happens on other machines other than my development machine, etc..

- Troy

Dan Haddix
May 9th, 1999, 10:05 PM
OK I have no idea if this will work or not (since it works either way on my Win95 machine), but since CToolTipCtrl is derived from CWnd couldn't you just call the BringWindowToTop( ) function to make sure it displays on top of the other controls???

Hope this helps,
Dan

P.S. Let me know if this actually works!!!