Click here to Skip to main content
15,922,533 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMSXML Memory Leak Pin
Demián Gutierrez4-Apr-05 11:44
Demián Gutierrez4-Apr-05 11:44 
GeneralShowHTMLDialog working with XP not Win98 Pin
georgiek504-Apr-05 9:37
georgiek504-Apr-05 9:37 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
Neville Franks4-Apr-05 11:07
Neville Franks4-Apr-05 11:07 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
georgiek504-Apr-05 11:48
georgiek504-Apr-05 11:48 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
Neville Franks4-Apr-05 11:56
Neville Franks4-Apr-05 11:56 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
Michael Dunn4-Apr-05 12:47
sitebuilderMichael Dunn4-Apr-05 12:47 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
georgiek505-Apr-05 5:46
georgiek505-Apr-05 5:46 
GeneralCTreeCtrl items highlight Pin
Maximilien4-Apr-05 8:10
Maximilien4-Apr-05 8:10 
I have a tree containing a large number of items, each leaf item has a PARAM attached to it ( pointer to its data )

Is there a better way to highlight items in the tree than just looping thru all items in it ?

for example, I have something like (pseudo code):

...
for ( myData; ++myData )
{
  tree.highlightItem( myData, TVI_ROOT );
}
...

myTree::highlightItem( myDataType myData, HTREEITEM hItem );
{
  HTREEITEM hCurrent = hItem;
  while( hCurrent ) 
  { 
    HTREEITEM hChild = GetChildItem( hCurrent );
    myDataType* pData  = (myDataType*)GetItemData( hCurrent );

    if ( pData == myData )
    {
      SetItemState( hCurrent, TVIS_SELECTED, TVIS_SELECTED );
    }
    if( highlightItem( hChild, myData ) )
      return true;
    
    // get the next item
    hCurrent = GetNextItem( hCurrent, TVGN_NEXT );
  }
}


I can set the root item as close as possible to the leaf I'm looking for, eliminating as much recursion as possible, but if a sub-tree contains a very large amount of items,

Is there a better solution ?

Thanks.



Maximilien Lincourt
Your Head A Splode - Strong Bad
GeneralRe: CTreeCtrl items highlight Pin
Neville Franks4-Apr-05 11:16
Neville Franks4-Apr-05 11:16 
GeneralRe: CTreeCtrl items highlight Pin
Maximilien4-Apr-05 12:47
Maximilien4-Apr-05 12:47 
GeneralResources not included Pin
dabs4-Apr-05 8:10
dabs4-Apr-05 8:10 
Questionhow to write in text file Pin
smarty124-Apr-05 7:55
smarty124-Apr-05 7:55 
AnswerRe: how to write in text file Pin
NewbieStats4-Apr-05 9:24
NewbieStats4-Apr-05 9:24 
GeneralSecure FTP Pin
Member 18509854-Apr-05 6:39
Member 18509854-Apr-05 6:39 
GeneralRe: Secure FTP Pin
RobJones4-Apr-05 7:27
RobJones4-Apr-05 7:27 
GeneralScrollBar Message Handling Pin
blinkered4-Apr-05 6:28
blinkered4-Apr-05 6:28 
GeneralRe: ScrollBar Message Handling Pin
PJ Arends4-Apr-05 8:26
professionalPJ Arends4-Apr-05 8:26 
GeneralHelp Urgent, Windows folder size without file searching Pin
inbakumar.G4-Apr-05 5:57
inbakumar.G4-Apr-05 5:57 
GeneralRe: Help Urgent, Windows folder size without file searching Pin
David Crow4-Apr-05 9:40
David Crow4-Apr-05 9:40 
GeneralWindows Search Pin
Anonymous4-Apr-05 5:44
Anonymous4-Apr-05 5:44 
GeneralRe: Windows Search Pin
David Crow4-Apr-05 17:15
David Crow4-Apr-05 17:15 
GeneralBitmap of CBitmapButton not working Pin
greekgoddj4-Apr-05 5:30
greekgoddj4-Apr-05 5:30 
GeneralRe: Bitmap of CBitmapButton not working Pin
Ryan Binns4-Apr-05 18:58
Ryan Binns4-Apr-05 18:58 
GeneralRe: Bitmap of CBitmapButton not working Pin
greekgoddj4-Apr-05 21:45
greekgoddj4-Apr-05 21:45 
GeneralC++ dll to start another thread from VB Pin
BlackDice4-Apr-05 5:26
BlackDice4-Apr-05 5:26 

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.