BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGSuite for MFC
 BCGSuite for MFC
 CBCGPTreeCtrlEx sorting while updating
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

cillybole

1 Posts

Posted - 12/21/2020 :  11:59:06 AM  Show Profile  Reply with Quote
I'm using a CBCGPTreeCtrlEx to hold some data that is updated frequently (~500 msec intervals). The data is held in a tree view (i.e. many rows have children) and so I'm using things like GetParentItem(), GetNextSiblingItem(), etc. while updating.

The problem arises when a user clicks a column to sort. I need some way to know when sorting is taking place so I can lock my view which will hold off updates until the sort is complete. I'm looking for the best way to know when a sort starts / stops in my object which inherits from CBCGPTreeCtrlEx.

Also, bonus question: I convert this view from flat view to tree view. Sometimes multiple rows get selected and stay selected. I haven't looked in to this yet, but is this a common problem? I'm thinking maybe I'm supposed to handle this myself? i.e. find out which row is selected, do my conversion, deselect any rows, then reselect the originally selected (full) row? Seems hacky to me, I'm thinking there's more to this.

Thank you for any input.
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft Forums © Copyright (c) 1998-2022 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000