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 » Status bar - Toolbar Tooltip position Collapse All
Subject Author Date
Ed Grochowski Feb 2, 2007 - 11:55 AM

We have created a small toolbar inside the status bar. The status bar is now a little taller than the default to accommodate our desired icon sizes.

Now when we use tooltips and the programs window is maximized, they appear right on top of the toolbar icons (under the cursor) thereby making them unusable.

The tooltips in the standard toolbars appear below the buttons which is fine. I am guessing that because the statusbar is at the bottom edge of the screen it shifts them up... but they end up in the wrong position.

Is there a way to change where the tooltips are positioned with respect to the buttons (say above instead of below)?

Ed Grochowski Mar 2, 2007 - 12:58 PM

Unfortunately this has no effect.

We current pass WS_CHILD | WS_VISIBLE | CBRS_ALIGN_BOTTOM | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC
to the creation routine.

If I add either CBRS_TOP or CBRS_BOTTOM to the above flags it still does not have the desired effect.

Strangely enough... if I remove the CBRS_TOOLTIPS flag... it still does tooltips?

Technical Support Mar 3, 2007 - 6:27 AM

Thank you for reporting these issues. To fix this, please update the source code for the CExtControlBar::OnAdvancedPopupMenuTipWndGet() and CExtControlBar::OnAdvancedPopupMenuTipWndDisplay() methods in the ../Src/ExtControlBar.cpp file:

CExtPopupMenuTipWnd * CExtControlBar::OnAdvancedPopupMenuTipWndGet() const
{
      if( ! g_bUseAdvancedToolTips )
            return NULL;
      if( m_bSuspendTips )
            return NULL;
      if( ( ( ( const_cast < CExtControlBar * > ( this ) ) -> GetBarStyle() ) & CBRS_TOOLTIPS ) == 0 )
            return NULL;
      return (&( CExtPopupMenuSite::g_DefPopupMenuSite.GetTip() ));
}

void CExtControlBar::OnAdvancedPopupMenuTipWndDisplay(
      CExtPopupMenuTipWnd & _ATTW,
      const RECT & rcExcludeArea,
      __EXT_MFC_SAFE_LPCTSTR strTipText
      ) const
{
      ASSERT_VALID( this );
      ASSERT( strTipText != NULL && _tcslen( strTipText ) > 0 );
      if(         IsFixedMode()
            &&    IsFixedDockStyle()
            &&    (     (     m_pDockSite != NULL
                        &&    GetSafeDockBarDlgCtrlID() == AFX_IDW_DOCKBAR_BOTTOM
                        )
                  ||    ( ( ( const_cast < CExtControlBar * > ( this ) ) -> GetBarStyle() ) & CBRS_ALIGN_BOTTOM ) != 0
                  )
            )
            _ATTW.SetTipStyle( CExtPopupMenuTipWnd::__ETS_INV_RECTANGLE_NO_ICON );
      else
            _ATTW.SetTipStyle( CExtPopupMenuTipWnd::__ETS_RECTANGLE_NO_ICON );
      _ATTW.SetText( strTipText );
      _ATTW.Show( (CWnd*)this, rcExcludeArea );
}

Technical Support Feb 5, 2007 - 11:50 AM

The CExtToolControlBar toolbar is created using the CExtControlBar::Create() method that takes a parameter with window styles. Its default value combines several CBRS_*** control bar styles. You can set CBRS_TOP or CBRS_BOTTOM to specify the tooltip’s location.