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 » CExtDurationWnd bugs Collapse All
Subject Author Date
Richard Rodruck Jan 14, 2009 - 12:50 PM


SelectPrevItem and SelectNextItem navigation do not work properly.  they both get stuck on the day regardless of how you try to move from one item to the next.  The only way to do so is to clik on the year.  I added



&& pII2->m_eItemType != pII->m_eItemType


to the loop in the functions and it works better but the left and right key don’t work the ay they should.  This does show up in the samples.


 


Technical Support Jan 15, 2009 - 4:08 AM

Thank you for reporting this issue. We have already fixed it. Here is the source code for the updated CExtDurationWnd::SelectNextItem() and CExtDurationWnd::SelectPrevItem() methods:

bool CExtDurationWnd::SelectNextItem( const ITEM_INFO * pII )
{
            ASSERT_VALID( this );
LONG nStartIndex = _ItemGetIndexOf( pII );
LONG nItemIndex = nStartIndex;
LONG nItemCount = LONG( m_arrItems.GetSize() );
            for( /*nItemIndex = 0*/; nItemIndex < nItemCount; nItemIndex ++ )
            do 
            {
                        nItemIndex += 1;
                        if( nItemIndex >= nItemCount )
                                    nItemIndex = 0;
                        ITEM_INFO * pII2 = m_arrItems[ nItemIndex ];
                        ASSERT( pII2 != NULL );
                        if(                     pII2 != NULL 
                                    &&        pII2->m_bVisible
                                    &&        pII2->m_eItemType != CExtDurationWnd::label
                                    )
                        {
                                    OnSelectItem( pII2 );
                                    return true;
                        }
            } while( nItemIndex != nStartIndex );
            return false;
}

bool CExtDurationWnd::SelectPrevItem( const ITEM_INFO * pII )
{
            ASSERT_VALID( this );
LONG nStartIndex = _ItemGetIndexOf( pII );
            if( nStartIndex < 0 )
                        nStartIndex = (LONG)m_arrItems.GetSize();
LONG nItemIndex = nStartIndex;
LONG nItemCount = LONG( m_arrItems.GetSize() );
            for( /*nItemIndex = 0*/; nItemIndex < nItemCount; nItemIndex ++ )
            do 
            {
                        nItemIndex -= 1;
                        if( nItemIndex < 0 )
                                    nItemIndex = nItemCount - 1;
                        ITEM_INFO * pII2 = m_arrItems[ nItemIndex ];
                        ASSERT( pII2 != NULL );
                        if(                     pII2 != NULL 
                                    &&        pII2->m_bVisible
                                    &&        pII2->m_eItemType != CExtDurationWnd::label
                                    )
                        {
                                    OnSelectItem( pII2 );
                                    return true;
                        }
            } while( nItemIndex != nStartIndex );
            return false;
}