Click here to Skip to main content
15,905,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Midi Application. Help desperately needed! Pin
RandomMonkey30-Jan-06 17:16
RandomMonkey30-Jan-06 17:16 
GeneralRe: Midi Application. Help desperately needed! Pin
normanS30-Jan-06 23:46
normanS30-Jan-06 23:46 
QuestionFinding Windows installation directory Pin
act_x28-Jan-06 6:25
act_x28-Jan-06 6:25 
AnswerRe: Finding Windows installation directory Pin
gianct28-Jan-06 7:14
gianct28-Jan-06 7:14 
AnswerRe: Finding Windows installation directory Pin
RandomMonkey28-Jan-06 7:17
RandomMonkey28-Jan-06 7:17 
AnswerRe: Finding Windows installation directory Pin
PJ Arends28-Jan-06 9:49
professionalPJ Arends28-Jan-06 9:49 
AnswerRe: Finding Windows installation directory Pin
Vipin Aravind28-Jan-06 18:56
Vipin Aravind28-Jan-06 18:56 
GeneralRe: Finding Windows installation directory Pin
Eytukan29-Jan-06 2:50
Eytukan29-Jan-06 2:50 
QuestionAgain CListBox Pin
hanno2528-Jan-06 6:15
hanno2528-Jan-06 6:15 
AnswerRe: Again CListBox Pin
PJ Arends28-Jan-06 9:55
professionalPJ Arends28-Jan-06 9:55 
AnswerRe: Again CListBox Pin
Eytukan28-Jan-06 17:17
Eytukan28-Jan-06 17:17 
AnswerRe: Again CListBox Pin
Laxman929-Jan-06 17:43
Laxman929-Jan-06 17:43 
Questionmemcpy Pin
Anthony988728-Jan-06 6:06
Anthony988728-Jan-06 6:06 
AnswerRe: memcpy Pin
Chris Losinger28-Jan-06 6:12
professionalChris Losinger28-Jan-06 6:12 
AnswerRe: memcpy Pin
Roland Pibinger28-Jan-06 7:54
Roland Pibinger28-Jan-06 7:54 
QuestionLoading list elements in a CListBox Pin
hanno2528-Jan-06 5:37
hanno2528-Jan-06 5:37 
AnswerRe: Loading list elements in a CListBox Pin
Owner drawn29-Jan-06 18:04
Owner drawn29-Jan-06 18:04 
QuestionWhat's wrong with my map engine? Pin
Lord Kixdemp28-Jan-06 4:35
Lord Kixdemp28-Jan-06 4:35 
QuestionProblems with a trayicon popup menu Pin
428828-Jan-06 3:51
428828-Jan-06 3:51 
AnswerRe: Problems with a trayicon popup menu Pin
Owner drawn29-Jan-06 18:06
Owner drawn29-Jan-06 18:06 
GeneralRe: Problems with a trayicon popup menu Pin
428829-Jan-06 19:05
428829-Jan-06 19:05 
GeneralRe: Problems with a trayicon popup menu Pin
Owner drawn30-Jan-06 16:50
Owner drawn30-Jan-06 16:50 
QuestionMS DataGrid Control 6 - Find Selected Row & Read Cell Values Pin
sdancer7528-Jan-06 3:07
sdancer7528-Jan-06 3:07 
QuestionNumber of Children in a Particular Node Pin
kandukuri27-Jan-06 23:53
kandukuri27-Jan-06 23:53 
AnswerRe: Number of Children in a Particular Node Pin
Stephen Hewitt28-Jan-06 0:43
Stephen Hewitt28-Jan-06 0:43 
If I understand your question correctly you want to count the immediate children of a node. If this is the case code like this should do it:

UINT Count = 0;
HTREEITEM hItem = m_Tree.GetChildItem(hRootItem);
while (hItem != NULL)
{
  ++Count;
  HTREEITEM hNextItem = m_Tree.GetNextSiblingItem(hItem);
}


NOTE: I haven't actually tried this! Assumes you're using MFC (although it is easily adaptable if you're not).

Steve

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.