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 » RibbonBar seems to have a bug. Collapse All
Subject Author Date
tera t Feb 13, 2008 - 10:14 PM

Hello.

A program falls.

void CMyRibbonBar::OnRibbonGalleryItemSelEndOK(
CExtRibbonGalleryWnd & wndRG,
CExtRibbonGalleryPopupMenuWnd * pGalleryPopup,
CExtRibbonButtonGallery * pRibbonGalleryTBB,
CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI
)
{
    AfxMessageBox("A program falls.");
}

Technical Support Feb 14, 2008 - 6:27 AM

Thank you very much for reporting this issue. To fix it, please update the following method:

void CExtToolBoxWnd::OnLButtonUp(UINT nFlags, CPoint point) 
{
      nFlags;
      if( GetEditorHWND() != NULL )
            return;
HWND hWndOwn = GetSafeHwnd();
bool bMultipleExp = ( (GetToolBoxWndStyle() & __TBWS_MULTIPLE_EXPANDED_GROUPS) != 0 ) ? true : false;
CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI_Hit = ItemHitTest( point );
      if( m_pItemTrackPressed != NULL )
      {
            CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI = (pTBCI_Hit == m_pItemTrackPressed) ? pTBCI_Hit : NULL;
            m_pItemTrackPressed->ModifyItemStyle( 0, __TBWI_PRESSED );
            m_pItemTrackPressed = NULL;
            if( pTBCI != NULL )
            {
                  CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI_Parent = pTBCI->ItemGetNext(__TBCGN_PARENT);
                  ASSERT( pTBCI_Parent != NULL );
                  if( bMultipleExp && pTBCI_Parent == m_pItemRoot )
                  {
                        bool bHaveVertScrollBar = OnSwHasScrollBar( false );
                        ItemExpand( pTBCI, TVE_TOGGLE, true, bHaveVertScrollBar ? false : true );
                  }
                  else
                  {
                        ItemSetActive( pTBCI, true, true );
                        OnToolBoxWndItemSelEndOK( pTBCI );
                        if( ! ::IsWindow( hWndOwn ) )
                              return;
                  }
            }
            else
                  UpdateToolBoxWnd( true );
            if( CExtMouseCaptureSink::GetCapture() == hWndOwn )
                  CExtMouseCaptureSink::ReleaseCapture();
            m_ptStartLeftBtnTrack.x = m_ptStartLeftBtnTrack.y = -1;
            return;
      }
      if( m_bTrackingBtnDown )
      {
            ASSERT( ! m_bTrackingBtnUp );
            KillTimer( __EXT_TOOLBOXWND_TIMER_ID_SCROLL );
            m_nScrollStepNo = 0L;
            m_bTrackingBtnDown = m_bPushedBtnDown = false;
            UpdateToolBoxWnd( true );
            if( CExtMouseCaptureSink::GetCapture() == GetSafeHwnd() )
                  CExtMouseCaptureSink::ReleaseCapture();
            return;
      }
      if( m_bTrackingBtnUp )
      {
            ASSERT( ! m_bTrackingBtnDown );
            KillTimer( __EXT_TOOLBOXWND_TIMER_ID_SCROLL );
            m_nScrollStepNo = 0L;
            m_bTrackingBtnUp = m_bPushedBtnUp = false;
            UpdateToolBoxWnd( true );
            if( CExtMouseCaptureSink::GetCapture() == GetSafeHwnd() )
                  CExtMouseCaptureSink::ReleaseCapture();
            return;
      }
      if( pTBCI_Hit != NULL && m_pItemActive2 == NULL )
      {
            DWORD dwHitStyle = pTBCI_Hit->GetItemStyle();
            if( dwHitStyle & (__TBWI_ACTIVE|__TBWI_SELECTED) )
            {
                  SendMessage( WM_CANCELMODE );
                  ASSERT( m_hWndEditor == NULL );
                  m_hWndEditor = OnToolBoxWndStartItemEditor( pTBCI_Hit );
            }
      }
}
The bug should be gone after that.