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 » ToolTip Error In TabbedBars ( Ver. 2.81) Collapse All
Subject Author Date
Seung Cheol Lee Oct 29, 2007 - 4:46 AM

Hi.

I have used the TabbedBars ( CExtTabbedToolControlBarXXX ),
I have setted tooltip in the toolbar and the tabbedbars.

In pro-uis ver. 2.80, the tooltip have did well.
But In pro-uis ver. 2.81, the error was occured.
For error example, After changing the tab of tabbedbar, the tooltip was not operated.

I have tested in your "TabbedBars Sample Source".
The same error was occured.


Technical Support Oct 29, 2007 - 10:44 AM

Thank you for reporting this issue. To fix it, please update the source code for the CExtToolControlBar::OnTimer() method in the ../Prof-UIS/Src/ExtToolControlBar.cpp file

void CExtToolControlBar::OnTimer(__EXT_MFC_UINT_PTR nIDEvent) 
{
      switch( nIDEvent )
      {
            case __EXT_MFC_ID_TOOLBAR_HOVER_PROTECTION_TIMER:
            {
                  bool bStateClear = false;
                  INT nIndex, nCount = GetButtonsCount();
                  for( nIndex = 0; nIndex < nCount; nIndex ++ )
                  {
                        CExtBarButton * pTBB = GetButton( nIndex );
                        ASSERT_VALID( pTBB );
                        if(         ( ! pTBB->IsVisible() )
                              ||    ( pTBB->GetStyle() & TBBS_HIDDEN ) != 0
                              )
                              continue;
                        bool bHover = pTBB->IsHover();
                        if( bHover && m_nBtnIdxHover != nIndex )
                        {
                              pTBB->SetHover( false );
                              _InvalidateButton( nIndex );
                              bStateClear = true;
                              break;
                        }
                  }
                  if( bStateClear )
                  {
                        KillTimer( __EXT_MFC_ID_TOOLBAR_HOVER_PROTECTION_TIMER );
                        return;
                  }
                  bool bActiveHover =
                        (     ( m_nBtnIdxHover >= 0 )
                        ||    CExtPopupMenuWnd::TestHoverEnabledFromActiveHWND( m_hWnd )
                        ) ? true : false;
                  if(         bActiveHover
                        &&    m_pDockSite->GetSafeHwnd() != NULL
                        &&    ( ! m_pDockSite->IsWindowEnabled() )
                        )
                        bActiveHover = false;
                  if( ! bActiveHover )
                  {
                        _UpdateHoverButton( CPoint(32767,32767), false );
                        KillTimer( __EXT_MFC_ID_TOOLBAR_HOVER_PROTECTION_TIMER );
                        CExtPopupMenuTipWnd * pATTW =
                              OnAdvancedPopupMenuTipWndGet();
                        if( pATTW != NULL )
                              pATTW->Hide();
                        CWnd::CancelToolTips();
                  }
                  else
                  {
                        if( m_nBtnIdxHover >= 0 )
                        {
                              CPoint pt;
                              if( ::GetCursorPos( &pt ) )
                              {
                                    ScreenToClient( &pt );
                                    INT nHT = HitTest( pt );
                                    if( nHT != m_nBtnIdxHover )
                                    {
                                          KillTimer( __EXT_MFC_ID_TOOLBAR_HOVER_PROTECTION_TIMER );
                                          _UpdateHoverButton( pt, false );
                                    }
                              }
                        }
                  }
            }
            return; // case __EXT_MFC_ID_TOOLBAR_HOVER_PROTECTION_TIMER
      } // switch( nIDEvent )
      CExtControlBar::OnTimer(nIDEvent);
}