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 General Discussion » Hover event for MDI tab Collapse All
Subject Author Date
Dmitry Dulepov Oct 25, 2004 - 7:12 AM

I need to perform an action (similar to displaying tooltip) when user movers mouse over a tab of the MDI window. Action is different for each tab. What is the best method to accomplish this? I found OnTabWndMouseTrackingHoverStart/Stop methods but not sure that they can help...

Technical Support Oct 26, 2004 - 1:32 AM

The CExtTabWnd::OnTabWndMouseTrackingHoverStart and CExtTabWnd::OnTabWndMouseTrackingHoverStop methods are used to track the mouse hover events as the mouse pointer moves over buttons (scroll buttons, "?", "X" and tab-list buttons). You cannot use these methods to detect the mouse hover over tab items.

What you may do is as follows. Please create a class derived from the CExtTabWnd and add message handlers for the WM_MOUSEMOVE and WM_TIMER messages in it. In the OnMouseMove method, call CExtTabWnd::ItemHitTest method and, if the mouse pointer is over any tab item, set a timer, store an index of this item, and display anything you need relating to the tab item. The OnTimer method should detect whether the mouse pointer left the tab window and/or the tab item specified with the stored index and hide the thing displayed over the tab item.

Of course, we can code this feature or review your source code if you encounter any difficulties.