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 » CoolToolTips not working Collapse All
Subject Author Date
Suhai Gyorgy Jan 24, 2006 - 6:41 AM

Dear Support,

CExtPopupMenuWnd::g_bMenuShowCoolTips = true;
and
CExtControlBar::g_bUseAdvancedToolTips = true;
doesn’t seem to take effect, even in projects built with the integrated Prof-UIS Appwizard. Is this a known issue? How could I resolve it? I’m using v.2.52.

Thank you: Chris.

Technical Support Jan 25, 2006 - 4:33 AM

The CExtPopupMenuWnd::g_bMenuShowCoolTips property will be removed in one of the next releases. The balloon tip is implemented in the CExtPopupMenuTipWnd class. This class now allows you to show tips of several shape types. The CExtPopupMenuTipWnd::e_tip_style_t enumeration describes the currently supported tooltip types:

 enum e_tip_style_t
 {
  __ETS_NONE = 0,
  __ETS_BALLOON = 1,
  __ETS_BALLOON_NO_ICON = 2,
  __ETS_RECTANGLE = 3,
  __ETS_RECTANGLE_NO_ICON = 4,
  __ETS_INV_RECTANGLE = 5,
  __ETS_INV_RECTANGLE_NO_ICON = 6,
 };
The __ETS_NONE value stands for no tooltip at all and should be used in the following global constants:
CExtPopupMenuWnd::g_eTtsClassicMenu // for popup menu
CExtPopupMenuWnd::g_eTtsPaletteMenu // for palette popup menu
CExtPopupMenuWnd::g_eTtsColorMenu // for color menu
CExtPopupMenuWnd::g_eTtsTearOffCaption // for tear-off caption in any menu
The CExtPopupMenuWnd::g_eTtsClassicMenu variable describes the type of tooltip in a popup menu. It is set to CExtPopupMenuTipWnd::__ETS_NONE by default. You can set it to CExtPopupMenuTipWnd::__ETS_BALLOON to see tips displayed by default over menu items in older Prof-UIS versions.

Suhai Gyorgy Jan 25, 2006 - 6:17 AM

Thank you for your reply!

This made the balloon-style tooltip to work in my popup menus, but I also couldn’t turn CExtToolControlBar’s tooltips into balloon styled ones. How could I make those work the same way?

Best regards: Chris

Technical Support Jan 26, 2006 - 11:56 AM

Here is the source code for the CExtControlBar::OnAdvancedPopupMenuTipWndDisplay() method which is responsible for displaying tooltips in both toolbar’s buttons and resizable bar’s caption buttons:

void CExtControlBar::OnAdvancedPopupMenuTipWndDisplay(
 CExtPopupMenuTipWnd & _ATTW,
 const RECT & rcExcludeArea,
 __EXT_MFC_SAFE_LPCTSTR strTipText
 ) const
{
    ASSERT_VALID( this );
    ASSERT( strTipText != NULL && _tcslen( strTipText ) > 0 );
    _ATTW.SetTipStyle( CExtPopupMenuTipWnd::__ETS_RECTANGLE_NO_ICON );
    _ATTW.SetText( strTipText );
    _ATTW.Show( (CWnd*)this, rcExcludeArea );
}
Please create and use your CExtToolControlBar-derived class which implements the OnAdvancedPopupMenuTipWndDisplay() virtual method with the same body but the __ETS_RECTANGLE_NO_ICON constant should be replaced with __ETS_BALLOON_NO_ICON.

Suhai Gyorgy Jan 27, 2006 - 3:35 AM

Hi!

I’ll try that out, thank you! Are you planning on a global variable that would make this style changable? I mean you had CExtControlBar::g_bUseAdvancedToolTips earlier, but I guess now that setting doesn’t change anything, even though my CExtToolControlBar is in the CExtCTA template. Something like CExtControlBar::g_eTtsToolBar variable would be great, having the same type as that of CExtPopupMenuWnd::g_eTtsClassicMenu (CExtPopupMenuTipWnd::e_tip_style_t type)

Thank you again: Chris.

Technical Support Jan 27, 2006 - 11:02 AM

The CExtCTA template class now should not be used with the Prof-UIS control bars because the CExtControlBar supports extended tooltips. We could add the global or local member to the CExtControlBar class but we think it is a bit funny to see balloons over toolbar buttons.