Click here to Skip to main content
15,891,629 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: call to 'another program from C code Pin
salv0328-Sep-11 5:52
salv0328-Sep-11 5:52 
GeneralRe: call to 'another program from C code Pin
David Crow28-Sep-11 7:06
David Crow28-Sep-11 7:06 
GeneralRe: call to 'another program from C code Pin
Albert Holguin29-Sep-11 3:45
professionalAlbert Holguin29-Sep-11 3:45 
Questionindex of HTREEITEM item? Pin
zon_cpp28-Sep-11 0:56
zon_cpp28-Sep-11 0:56 
QuestionRe: index of HTREEITEM item? Pin
Code-o-mat28-Sep-11 1:42
Code-o-mat28-Sep-11 1:42 
AnswerRe: index of HTREEITEM item? Pin
Madhu Nair28-Sep-11 1:47
Madhu Nair28-Sep-11 1:47 
GeneralRe: index of HTREEITEM item? Pin
zon_cpp28-Sep-11 2:06
zon_cpp28-Sep-11 2:06 
GeneralRe: index of HTREEITEM item? Pin
Stefan_Lang28-Sep-11 4:52
Stefan_Lang28-Sep-11 4:52 
You don't. A Tree does not have or use an index. Even if it had, the moment an item gets removed or added, any stored index values would all be invalidated - so you cannot store an index and hope to later retrieve the correct item through that index, because it might no longer be valid!

The HTREEITEM value you get is what is generally called a 'handle'. It serves as a reference to the actual item, and it will remain valid until this child item is removed from the tree. You should use that handle and retrieve the child item, using HTREEITEM GetChildItem(HTREEITEM hItem) const; (see http://msdn.microsoft.com/en-US/library/yk3ystd6%28v=VS.80%29.aspx[^]).
AnswerRe: index of HTREEITEM item? Pin
Maximilien28-Sep-11 2:52
Maximilien28-Sep-11 2:52 
GeneralRe: index of HTREEITEM item? Pin
Stefan_Lang28-Sep-11 4:54
Stefan_Lang28-Sep-11 4:54 
QuestionRe: index of HTREEITEM item? Pin
Code-o-mat28-Sep-11 9:57
Code-o-mat28-Sep-11 9:57 
AnswerRe: index of HTREEITEM item? Pin
Maximilien28-Sep-11 12:34
Maximilien28-Sep-11 12:34 
QuestionRe: index of HTREEITEM item? Pin
David Crow28-Sep-11 3:07
David Crow28-Sep-11 3:07 
AnswerRe: use LPARAM to get index Pin
Software_Developer28-Sep-11 3:10
Software_Developer28-Sep-11 3:10 
QuestionCRichEdit control Scrollbar issue in MFC Application Pin
Member 827069028-Sep-11 0:19
Member 827069028-Sep-11 0:19 
AnswerRe: CRichEdit control Scrollbar issue in MFC Application - Repost Pin
Richard MacCutchan28-Sep-11 3:50
mveRichard MacCutchan28-Sep-11 3:50 
QuestionSelectItem of CTreeCtrl Pin
zon_cpp27-Sep-11 23:44
zon_cpp27-Sep-11 23:44 
AnswerRe: SelectItem of CTreeCtrl Pin
Zasky28-Sep-11 0:41
Zasky28-Sep-11 0:41 
AnswerRe: SelectItem of CTreeCtrl Pin
Roger Allen29-Sep-11 0:34
Roger Allen29-Sep-11 0:34 
QuestionEnvironment for PIC programming Pin
CodingLover27-Sep-11 23:40
CodingLover27-Sep-11 23:40 
AnswerRe: Environment for PIC programming Pin
Software_Developer28-Sep-11 0:19
Software_Developer28-Sep-11 0:19 
GeneralRe: Environment for PIC programming Pin
CodingLover28-Sep-11 0:26
CodingLover28-Sep-11 0:26 
GeneralRe: Environment for PIC programming Pin
Software_Developer28-Sep-11 2:04
Software_Developer28-Sep-11 2:04 
GeneralRe: Environment for PIC programming Pin
CodingLover28-Sep-11 18:02
CodingLover28-Sep-11 18:02 
GeneralRe: Environment for PIC programming Pin
Albert Holguin29-Sep-11 3:34
professionalAlbert Holguin29-Sep-11 3:34 

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.