Click here to Skip to main content
15,913,944 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Installing program Pin
David Crow3-Aug-04 2:37
David Crow3-Aug-04 2:37 
GeneralRe: Installing program Pin
Larsson3-Aug-04 4:58
Larsson3-Aug-04 4:58 
GeneralRe: Installing program Pin
David Crow4-Aug-04 2:29
David Crow4-Aug-04 2:29 
GeneralRe: Installing program Pin
Larsson4-Aug-04 2:31
Larsson4-Aug-04 2:31 
GeneralCTreeCtrl Pin
(Steven Hicks)n+12-Aug-04 9:01
(Steven Hicks)n+12-Aug-04 9:01 
GeneralRe: CTreeCtrl Pin
PJ Arends2-Aug-04 16:26
professionalPJ Arends2-Aug-04 16:26 
GeneralRe: CTreeCtrl Pin
(Steven Hicks)n+12-Aug-04 18:41
(Steven Hicks)n+12-Aug-04 18:41 
GeneralRe: CTreeCtrl Pin
PJ Arends2-Aug-04 19:40
professionalPJ Arends2-Aug-04 19:40 
This untested code should go through the tree, starting at the supplied HTREEITEM, looking for the first occurance of the text.

HTREEITEM MyTree::FindItem (CString text, HTREEITEM start)
{
  HTREEITEM child = NULL;
  while (start && GetItemText(start) != text)
  {
    child = GetChildItem(start);        // equivalent to GetNextItem(start, TVGN_CHILD)
    while (child && GetItemText(child) != text)
    {
      child = FindItem(text, child);
      if (!child)
        child = GetNextSiblingItem(child);  // equivalent to GetNextItem(child, TVGN_NEXT)
    }
 
    if (child)
      break;
    start = GetNextSiblingItem(start);
  }
 
  if (GetItemText(start) == text)
    return start;
  return child;
}










"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04

Within you lies the power for good - Use it!
GeneralA CEdit question Pin
0v3rloader2-Aug-04 8:55
0v3rloader2-Aug-04 8:55 
GeneralRe: A CEdit question Pin
PJ Arends2-Aug-04 9:23
professionalPJ Arends2-Aug-04 9:23 
GeneralRe: A CEdit question Pin
0v3rloader2-Aug-04 9:29
0v3rloader2-Aug-04 9:29 
GeneralRe: A CEdit question Pin
PJ Arends2-Aug-04 9:46
professionalPJ Arends2-Aug-04 9:46 
GeneralRe: A CEdit question Pin
0v3rloader2-Aug-04 12:35
0v3rloader2-Aug-04 12:35 
Questiondownloading? Pin
Larsson2-Aug-04 8:17
Larsson2-Aug-04 8:17 
AnswerNo single way out Pin
bikram singh2-Aug-04 18:02
bikram singh2-Aug-04 18:02 
AnswerRe: downloading? Pin
Spiritofamerica7-Aug-04 11:12
Spiritofamerica7-Aug-04 11:12 
GeneralRe: downloading? Pin
Larsson7-Aug-04 23:58
Larsson7-Aug-04 23:58 
GeneralShowing dialogs Pin
Ivan Cachicatari2-Aug-04 6:58
Ivan Cachicatari2-Aug-04 6:58 
GeneralRe: Showing dialogs Pin
alex.barylski2-Aug-04 7:15
alex.barylski2-Aug-04 7:15 
GeneralRe: Showing dialogs Pin
valikac2-Aug-04 14:32
valikac2-Aug-04 14:32 
GeneralExpression parser. Unary minus problems :( Pin
Sheff2-Aug-04 6:50
Sheff2-Aug-04 6:50 
GeneralMFC Grid control 2.25 Pin
act_x2-Aug-04 6:18
act_x2-Aug-04 6:18 
Generalprogressbar and a win32 dll Pin
ns2-Aug-04 6:00
ns2-Aug-04 6:00 
GeneralRe: progressbar and a win32 dll Pin
palbano2-Aug-04 6:07
palbano2-Aug-04 6:07 
GeneralRe: progressbar and a win32 dll Pin
Ravi Bhavnani2-Aug-04 7:53
professionalRavi Bhavnani2-Aug-04 7:53 

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.