Print Page | Close Window

CXTPControlScrollBar::OnScroll Bug

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=14958
Printed Date: 16 November 2024 at 7:51pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPControlScrollBar::OnScroll Bug
Posted By: Simon HB9DRV
Subject: CXTPControlScrollBar::OnScroll Bug
Date 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



Replies:
Posted By: Oleg
Date Posted: 13 August 2009 at 1:53am
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


Posted By: Simon HB9DRV
Date Posted: 13 August 2009 at 3:15am
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net