Click here to Skip to main content
15,908,841 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to create 2 d dynamic array Pin
gentleguy26-Feb-08 23:51
gentleguy26-Feb-08 23:51 
GeneralRe: how to create 2 d dynamic array Pin
Cedric Moonen27-Feb-08 0:14
Cedric Moonen27-Feb-08 0:14 
GeneralRe: how to create 2 d dynamic array Pin
ThatsAlok27-Feb-08 2:04
ThatsAlok27-Feb-08 2:04 
GeneralRe: need help Pin
Rajesh R Subramanian27-Feb-08 0:13
professionalRajesh R Subramanian27-Feb-08 0:13 
GeneralMFC question about CTreeCtrl - I want to insert items as sort items into the tree Pin
Yanshof26-Feb-08 20:52
Yanshof26-Feb-08 20:52 
GeneralRe: MFC question about CTreeCtrl - I want to insert items as sort items into the tree Pin
Iain Clarke, Warrior Programmer26-Feb-08 22:13
Iain Clarke, Warrior Programmer26-Feb-08 22:13 
GeneralRe: MFC question about CTreeCtrl - I want to insert items as sort items into the tree Pin
Yanshof26-Feb-08 22:23
Yanshof26-Feb-08 22:23 
GeneralRe: MFC question about CTreeCtrl - I want to insert items as sort items into the tree Pin
Iain Clarke, Warrior Programmer26-Feb-08 23:36
Iain Clarke, Warrior Programmer26-Feb-08 23:36 
The first bit of code I gave you, uses the TVINSERTSTRUCT directly - the second uses one of the overload versions in CTreeCtrl.

I've looked, and I can't find any TVS_SORT, so I'm a bit stuck too.

The only suggestion I have is to raw...

TVINSERTSTRUCT tvis = {0};
tvis.hParent = TVI_ROOT;
tvis.hInsertAfter = TVI_LAST;         // <- I just saw a TVI_SORT you could use here. I knew there had to be one somewhere!
tvis.tvItem.mask = TVIF_TEXT;

tvis.tvItem.pszTest = _T("A");
SendDlgItemMessage (IDC_MYTREE, TVM_INSERTITEM, 0, (LPARAM)&tvis);
tvis.tvItem.pszTest = _T("Z");
SendDlgItemMessage (IDC_MYTREE, TVM_INSERTITEM, 0, (LPARAM)&tvis);
tvis.tvItem.pszTest = _T("C");
SendDlgItemMessage (IDC_MYTREE, TVM_INSERTITEM, 0, (LPARAM)&tvis);


And see how that turns out. It might be worth looking at the header files to see the value of TVI_SORT, so you can make sure it's not being used when you single step through the above code.

If this works, you can then see how your code deviates from it, but stepping into the CTreeCtrl::InsertItem member function.

Iain.

Iain Clarke appearing in spite of being begged not to by CPallini.

GeneralRename Pin
john563226-Feb-08 20:21
john563226-Feb-08 20:21 
QuestionRe: Rename Pin
Rajesh R Subramanian26-Feb-08 20:25
professionalRajesh R Subramanian26-Feb-08 20:25 
GeneralRe: Rename Pin
john563226-Feb-08 20:35
john563226-Feb-08 20:35 
QuestionRe: Rename Pin
Rajesh R Subramanian26-Feb-08 20:45
professionalRajesh R Subramanian26-Feb-08 20:45 
GeneralRe: Rename Pin
john563226-Feb-08 20:47
john563226-Feb-08 20:47 
GeneralRe: Rename Pin
Rajesh R Subramanian26-Feb-08 20:51
professionalRajesh R Subramanian26-Feb-08 20:51 
GeneralRe: Rename Pin
john563226-Feb-08 20:59
john563226-Feb-08 20:59 
GeneralRe: Rename Pin
Rajesh R Subramanian26-Feb-08 21:42
professionalRajesh R Subramanian26-Feb-08 21:42 
GeneralRe: Rename Pin
Rajkumar R26-Feb-08 20:54
Rajkumar R26-Feb-08 20:54 
GeneralRe: Rename Pin
john563226-Feb-08 21:19
john563226-Feb-08 21:19 
NewsRe: Rename Pin
James R. Twine27-Feb-08 1:15
James R. Twine27-Feb-08 1:15 
GeneralRe: Rename Pin
Expert Coming26-Feb-08 20:47
Expert Coming26-Feb-08 20:47 
GeneralRe: Rename Pin
john563226-Feb-08 20:50
john563226-Feb-08 20:50 
GeneralRe: Rename Pin
Maxwell Chen26-Feb-08 21:29
Maxwell Chen26-Feb-08 21:29 
GeneralRe: Rename Pin
Rajkumar R27-Feb-08 18:10
Rajkumar R27-Feb-08 18:10 
QuestionHow to use..._commit() Pin
john563226-Feb-08 20:13
john563226-Feb-08 20:13 
AnswerRe: How to use..._commit() Pin
Rajkumar R26-Feb-08 20:25
Rajkumar R26-Feb-08 20:25 

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.