CXTPControlScrollBar::OnScroll Bug |
Post Reply |
Author | |
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
Posted: 12 August 2009 at 3:47pm |
Hi All,
With 12.0.1 there's a bug in void CXTPControlScrollBar::OnScroll(UINT nSBCode, UINT nPos), you are not using m_nMin in the switch statement
I've created my own class from CXTPControlScrollBar but I'm sure you'll want to fix this (if you haven't already).
While you're at it you may want to add a member function to set m_nPage
|
|
Simon HB9DRV
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Guess it was fixed already. Here code we have now:
switch (nSBCode)
{ case SB_TOP: nCurPos = m_nMin; break; case SB_BOTTOM: nCurPos = m_nMax; break; case SB_LINEUP: nCurPos = max(nCurPos - 1, m_nMin); break;
case SB_LINEDOWN: nCurPos = min(nCurPos + 1, m_nMax); break; case SB_THUMBTRACK: nCurPos = nPos; break;
case SB_PAGEUP: nCurPos = max(nCurPos - m_nMax / 10, m_nMin); break; case SB_PAGEDOWN: nCurPos = min(nCurPos + m_nMax / 10, m_nMax); break; } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
OK, well done:)
Just make sure you add a member function so that the page size can be set.
I'll be upgrading later this year...
|
|
Simon HB9DRV
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |