![]() |
CXTListCtrl custom sorting |
Post Reply
|
| Author | |
jlee
Newbie
Joined: 06 December 2004 Status: Offline Points: 6 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTListCtrl custom sortingPosted: 16 August 2005 at 3:24pm |
|
Hi, I'm having a problem of implementing a custom sorting (by date) for CXTListCtrl. I overrided the 'SortList' function in my derived class. But somehow this function is not called when the list header column is clicked (it still conducts the default text sorting). Could you show me an example how I can do this? I'm using Toolkit Pro 9.51. Thanks in advance, Best regards, JLee |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 August 2005 at 7:39am |
|
Hello, Show your code. Did you try to trace? |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jlee
Newbie
Joined: 06 December 2004 Status: Offline Points: 6 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 August 2005 at 11:33am |
|
Hi oleg, Thanks for your response. I did trace into the part of my code. The attached is a project I modified directly from the original ListCtrl sample code of Toolkit Pro 9.51. I added a derived class 'CMySortListCtrl', in which I overrided the virtual function 'SortList' (its code I directly copy and pasted from CXTShellListBase::SortList). Then I changed the declaration of the member variable 'm_listCtrl' in 'CListCtrlDlg' to 'CMySortListCtrl'. The project was compiled in VS7.0. (I think I may find the problem now. It tends out that the 'SortColumn' gets notified for sorting when the list header is clicked in the sample. The overrided 'SortList' function is not called. Is this the way it is supposed to work?) Thanks again, JLee 2005-08-17_112433_ListCtrl.zip
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 August 2005 at 2:04pm |
|
in ListCtrlDlg.h replace CXTtHeaderCtrl m_header; to CXTFlatHeaderCtrl m_header; |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |