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 » CExtTabMdiWhidbeyWnd, scroll right and left Collapse All
Subject Author Date
Andrew Banks Sep 19, 2007 - 10:27 AM

How can I scroll an entire tab right or left when clicking the right and left scroll buttons on the mid tabs.
Currently, it scrolls some small number of pixles.

Technical Support Sep 20, 2007 - 8:40 AM

Yes, you are right. We changed our code as you suggested. Thank you.

Technical Support Sep 19, 2007 - 12:05 PM

You should apply the __ETWS_SCROLL_BY_PAGE tab window style by using the CExtTabWnd::ModifyTabWndStyle() method.

Andrew Banks Sep 19, 2007 - 3:52 PM

OK I tired that and I couldn’t get it to work.

Correctly, the code hit the CExtTabWnd::OnTimer with a scroll value of m_nScrollDirectionRest=301 that should have ontimer continue until
nScrollDirectionRest reached zero at which the timer is killed.


But, then for some reason immediately

void CExtTabWnd::OnCancelMode()
{
    CWnd::OnCancelMode();

    if( m_nScrollDirectionRest != 0 )
    {
        m_nScrollDirectionRest = 0;
        KillTimer( __EXTTAB_SCROLL_TIMER_ID );
    }

    OnTabWndMouseTrackingPushedStop( true );
    OnTabWndMouseTrackingHoverStop( true );
}




is called, ( I didn’t do it) and the timer is killed and does not complete the entire scroll for the whole tab.

Andrew Banks Sep 19, 2007 - 4:00 PM

OK, now I see what happened.,
CExtTabWnd::OnLButtonUp eventually calls CExtTabWnd::OnCancelMode() and cancels the timer which
should not be canceled .

I think the code should be:

void CExtTabWnd::OnCancelMode()
{
CWnd::OnCancelMode();

if ( ( GetTabWndStyle() & __ETWS_SCROLL_BY_PAGE ) == 0 )
{    
if ( m_nScrollDirectionRest != 0 )
{
m_nScrollDirectionRest = 0;
KillTimer( __EXTTAB_SCROLL_TIMER_ID );
}
}

OnTabWndMouseTrackingPushedStop( true );
OnTabWndMouseTrackingHoverStop( true );
}