Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » toolip Collapse All
Subject Author Date
Offer Har Nov 5, 2007 - 7:27 AM

Hi.

In your feature tour (http://www.prof-uis.com/FeatureTour.aspx?view=tour_tooltip_window)
You specify: "The Prof-UIS non-rectangular tooltip window is used in pop-up menus. You can also incorporate it whenever you want."
I would like to add a tooltip to a CWnd derived class - how can I do it?

Thanks,
Ron.

Technical Support Nov 6, 2007 - 8:43 AM

You can do this by handling WM_MOUSEMOVE in a CWnd-derived window that has the following property:

CExtPopupMenuTipWnd m_wndCoolTip;
Let’s assume your window has hit-tested some CRect rcItem part of it in its client coordinates and you would like to display a tooltip for this part:
      CRect & rcItem = . . .
      CRect rcScreenArea = rcItem;
      ClientToScreen( &rcScreenArea );
      m_wndCoolTip.SetText( _T("tooltip text here") );
      m_wndCoolTip.SetTipStyle( CExtPopupMenuTipWnd::__ETS_BALLOON );
      m_wndCoolTip.Show( this, rcScreenArea );
The m_wndCoolTip control will be displayed. Then it will be hidden as soon as the mouse has moved out of the rcItem rectangle or some other application gets activated over the desktop.