I have implemented a CToolTipCtrl in an MDI window which should pop when another window is over the point which the tooltip is placed. This works fine under XP but not under Vista.

The tooltip is created with the styles TTS_NOPREFIX, TTS_BALLOON and TTS_ALWAYSTIP using the Create() method.

When another MDI window is over the point the tooltip is popped using the pop method and the code looks something like the following.

CWnd* cwWindow = WindowFromPoint(pt);

if ( cwWindow && cwWindow->m_hWnd != cwFirstMDIWnd->m_hWnd )




Under Vista the window at point is always the tooltip which is different than the behavior in XP and the tooltip always remains on top of all MDI windows.

If I remove the TTS_BALLOON style under Vista then it behaves as it does in XP but without the visual style that I need. I have found no indication that this should be do to any changes in the Common Controls in Vista and it looks more like a Vista defect.

Any help will be appreciated.


Re: UI Development for Windows Vista The CToolTipCtrl and TTS_BALLOON style under Vista


After more tinkering, this appears to be related to the Vista theme and something to do with the MDIClient window. If I go back to classic mode in Vista the problem disappears. So I guess the question becomes, why in the Vista theme is a balloon tooltip in an MDI client able to see itself over other MDI windows and/or why do the MDI children fail to update/repaint properly

Re: UI Development for Windows Vista The CToolTipCtrl and TTS_BALLOON style under Vista


I was finally able to resolve this by changing from Create to CreateEx and adding in the WS_EX_TRANSPARENT style which doesn't make much sense. I say it doesn't make much sense because if the window that the tooltip is created for is moved so that the tootlip changes direction then the tooltip worked fine even though the applied styles appeared the same. If the tooltip was then moved back to it's original position the problem would occur again. In addition this only seems to occur when the Vista theme is applied.