Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Report Control Scroll Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Control Scroll Problem

 Post Reply Post Reply
Author
Message
brianh View Drop Down
Groupie
Groupie


Joined: 30 April 2004
Location: United Kingdom
Status: Offline
Points: 83
Post Options Post Options   Thanks (0) Thanks(0)   Quote brianh Quote  Post ReplyReply Direct Link To This Post Topic: Report Control Scroll Problem
    Posted: 10 January 2005 at 3:50am

Hi, if you turn off automatic column sizing (so it doesn't automatically resize columns to fit window) then resize window until the horizontal scroll bar appears you can then drag the scrollbar "thumb" and you can click on the scrollbar arrows to scroll the window, but if you click on the scroll bar itself nothing happens!

This behaviour can been seen in the report control sample program too, is this a bug, can it be fixed?

Thanks.



Edited by brianh
Back to Top
Flamer View Drop Down
Newbie
Newbie
Avatar

Joined: 15 January 2005
Location: Netherlands
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamer Quote  Post ReplyReply Direct Link To This Post Posted: 22 January 2005 at 6:22am

I notice the same 'bug'. The vertical scrollbar works perfectly!!!

Can this be solved in the next release??? ...Would be great!!!!

 

Back to Top
brianh View Drop Down
Groupie
Groupie


Joined: 30 April 2004
Location: United Kingdom
Status: Offline
Points: 83
Post Options Post Options   Thanks (0) Thanks(0)   Quote brianh Quote  Post ReplyReply Direct Link To This Post Posted: 24 January 2005 at 3:01am

I reported this as a bug and was told it will be fixed in the next release and given the code below to fix the problem in the mean time:

Yes, it was bug,, we fixed it already.

void CXTPReportControl::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) {

if (pScrollBar != NULL)

{

CWnd::OnHScroll(nSBCode, nPos, pScrollBar);

return;

}

int nCurPos = m_nLeftOffset;

// decide what to do for each diffrent scroll event

switch(nSBCode)

{

case SB_TOP: nCurPos = 0; break;

case SB_BOTTOM: nCurPos = GetScrollLimit(SB_HORZ); break;

case SB_LINEUP: nCurPos = max(nCurPos - 1, 0); break;

case SB_LINEDOWN: nCurPos = min(nCurPos + 1, GetScrollLimit(SB_HORZ)); break;

case SB_PAGEUP: nCurPos = max(nCurPos - m_rcReportArea.Width(), 0); break;

case SB_PAGEDOWN: nCurPos = min(nCurPos + m_rcReportArea.Width(), GetScrollLimit(SB_HORZ)); break;

case SB_THUMBTRACK:

case SB_THUMBPOSITION: nCurPos = nPos; break;

}

SetLeftOffset(nCurPos);

CWnd::OnHScroll(nSBCode, nPos, pScrollBar); }

You can replace this member and rebuild dll/lib

Back to Top
Flamer View Drop Down
Newbie
Newbie
Avatar

Joined: 15 January 2005
Location: Netherlands
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamer Quote  Post ReplyReply Direct Link To This Post Posted: 24 January 2005 at 5:31am

Ok, thx for the feedback!

 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.