-
July 20th, 1998, 11:42 AM
#1
Finding an item in CTreeCtrlX
Hi All!
The problem:
i've search from the root to the end in the control for an item with the FindItem function. But the function returned always NULL.
Whats wrong?
The solution:
The item was the first and the hItem paramter was GetRootItem(). The Item was never found by the function.
So you should change in the FindItem function:
// change
while( htiCur && htiCur != htiSel ) -> while( htiCur )
and to the end of the brakes you should insert
// original
if( htiCur == NULL )
{
if( bDownDir ) htiCur = GetRootItem();
else htiCur = GetLastItem( NULL );
}
// insert
if ( htiCur == htiSel ) break;
}
}
And then it works
By René
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|