Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: What is meaning is the Pin
Maer72727-Aug-01 4:46
Maer72727-Aug-01 4:46 
GeneralRe: What is meaning is the Pin
Steen Krogsgaard27-Aug-01 4:51
Steen Krogsgaard27-Aug-01 4:51 
GeneralRe: What is meaning is the Pin
Maer72727-Aug-01 17:56
Maer72727-Aug-01 17:56 
GeneralRe: What is meaning is the Pin
Steen Krogsgaard28-Aug-01 2:55
Steen Krogsgaard28-Aug-01 2:55 
Questionwhat means "exited with code"? Pin
Maer72727-Aug-01 3:19
Maer72727-Aug-01 3:19 
AnswerRe: what means Pin
Steen Krogsgaard27-Aug-01 4:36
Steen Krogsgaard27-Aug-01 4:36 
GeneralRe: what means Pin
Maer72727-Aug-01 17:26
Maer72727-Aug-01 17:26 
GeneralSorting in a CListCtrl Pin
27-Aug-01 2:34
suss27-Aug-01 2:34 
I'd like to know how to do an alphabetical sort of the items in a CListCtrl
I use LVS_SORTASCENDING as the window style but the problem I have is when the list has more than one column, the InsertItem function doesn't work for items placed in any column other than the first one.

The code I have is:
CListCtrl* pList = (CListCtrl*) GetDlgItem (IDC_LIST1);
pList->InsertColumn(0, "Column1", LVCFMT_CENTER, 100);
pList->InsertColumn(1, "Column2", LVCFMT_CENTER, 100);

pList->SetRedraw(FALSE);
pList->InsertItem(0, "Item0 Column0", 0);
pList->SetItemText(0, 1, "Item0 Column1", 0);
// Insert more items like the one above
pList->SetRedraw(TRUE);

If I use LVS_SORTASCENDING, the first column shows right (well sorted) but the second column doesn't display any item.

Thanks in advance,



GeneralRe: Sorting in a CListCtrl Pin
Tomasz Sowinski27-Aug-01 10:28
Tomasz Sowinski27-Aug-01 10:28 
GeneralRun-Time Objects Pin
MAXS72U27-Aug-01 1:31
MAXS72U27-Aug-01 1:31 
GeneralRe: Run-Time Objects Pin
27-Aug-01 2:10
suss27-Aug-01 2:10 
GeneralRe: Run-Time Objects Pin
MAXS72U27-Aug-01 4:31
MAXS72U27-Aug-01 4:31 
GeneralRe: Run-Time Objects Pin
Ganesh Ramaswamy27-Aug-01 5:38
Ganesh Ramaswamy27-Aug-01 5:38 
Generalsimple message loop question Pin
Kuniva27-Aug-01 1:30
Kuniva27-Aug-01 1:30 
GeneralRe: simple message loop question Pin
Ganesh Ramaswamy27-Aug-01 5:40
Ganesh Ramaswamy27-Aug-01 5:40 
Generalaccessing NT registry for different users Pin
Raja27-Aug-01 1:30
Raja27-Aug-01 1:30 
GeneralRe: accessing NT registry for different users Pin
Tomasz Sowinski27-Aug-01 10:33
Tomasz Sowinski27-Aug-01 10:33 
GeneralRe: accessing NT registry for different users Pin
Raja27-Aug-01 18:28
Raja27-Aug-01 18:28 
Question3-state pushbuttons?? Pin
27-Aug-01 1:07
suss27-Aug-01 1:07 
AnswerRe: 3-state pushbuttons?? Pin
Michael P Butler27-Aug-01 1:42
Michael P Butler27-Aug-01 1:42 
QuestionWhat is term "_thiscall" mean? Pin
Maer72727-Aug-01 0:59
Maer72727-Aug-01 0:59 
AnswerRe: What is term Pin
Ganesh Ramaswamy27-Aug-01 4:50
Ganesh Ramaswamy27-Aug-01 4:50 
GeneralRe: What is term Pin
Maer72727-Aug-01 17:34
Maer72727-Aug-01 17:34 
GeneralGet The Message Sender Pin
26-Aug-01 18:04
suss26-Aug-01 18:04 
GeneralRe: Get The Message Sender Pin
Uwe Keim27-Aug-01 0:57
sitebuilderUwe Keim27-Aug-01 0:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.