Edwin Yip
Edwin Yip

Reputation: 4220

How to determine if a cell is in the view port of a Virtual treeview?

How to determine if a cell is in the view port of a Virtual treeview? Thanks.

Upvotes: 0

Views: 255

Answers (1)

Rob Kennedy
Rob Kennedy

Reputation: 163357

Use the control's GetDisplayRect method to find the coordinates of the node you're interested in. Specify the column, or -1 for the entire row. For invisible or filtered-out nodes, it will return Rect(0, 0, 0, 0). Then check whether the returned rectangle is within the control's client area (ClientRect). You can use IntersectRect for that part.

Upvotes: 2

Related Questions