Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Bug fix to report’s tree drawing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug fix to report’s tree drawing

 Post Reply Post Reply
Author
Message
Torlack View Drop Down
Newbie
Newbie


Joined: 01 July 2004
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Torlack Quote  Post ReplyReply Direct Link To This Post Topic: Bug fix to report’s tree drawing
    Posted: 03 December 2004 at 12:28pm
Given the following tree layout, the tree structure fails to draw correctly in the report.

1
x2
xx3
xxx4
xxx5
x6

The DrawTreeStructure routine is broken and would not draw the line between 2 and 6 in the rows containing 4 and 5.

Here is the fix, to just the while loop.

pRow = pRow->GetParentRow();

if (pRow == NULL || pRow->GetParentRow() == 0 || pRow->IsGroupRow())
{
    break;
}

rcItem.OffsetRect(-nTreeIndent, 0);
if (!pRow->IsLastTreeRow())
{
    pDC->FillSolidRect(rcItem.left, rcItem.top - 1, 1, rcItem.Height() + 1, clrTreeStructure);
}

The "IsLastTreeRow" was causing it to abort early.  In my simple (and maybe wrong) fix, I only used it to test to see if we draw the line.

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 December 2004 at 7:44am

Sorry for our bad testing, you are rigtht. We fixed it as you suggest.

 

Thank you for your help!

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.047 seconds.