Click here to Skip to main content
15,921,382 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help with ListView Pin
User 665825-Nov-02 9:47
User 665825-Nov-02 9:47 
GeneralDetecting an SMTP server Pin
David Wulff23-Nov-02 5:13
David Wulff23-Nov-02 5:13 
GeneralRe: Detecting an SMTP server Pin
Anders Molin23-Nov-02 5:24
professionalAnders Molin23-Nov-02 5:24 
GeneralRe: Detecting an SMTP server Pin
Rohit  Sinha23-Nov-02 10:03
Rohit  Sinha23-Nov-02 10:03 
GeneralRe: Detecting an SMTP server Pin
Scott H. Settlemier23-Nov-02 10:59
Scott H. Settlemier23-Nov-02 10:59 
GeneralNeed help with CComboBox control. Pin
doubleplay0923-Nov-02 4:58
doubleplay0923-Nov-02 4:58 
Generaltoo many items in treeview Pin
Peter Molnar23-Nov-02 4:33
Peter Molnar23-Nov-02 4:33 
GeneralRe: too many items in treeview Pin
pnpfriend23-Nov-02 9:23
pnpfriend23-Nov-02 9:23 
// CollapseBranch - Collapses a branch completely
// hti - Handle of the tree item to collapse
void CTreeCtrlX::CollapseBranch( HTREEITEM hti)
{
if( ItemHasChildren( hti ) ){
Expand( hti, TVE_COLLAPSE );
hti = GetChildItem( hti );
do{
CollapseBranch( hti );
}while( (hti = GetNextSiblingItem( hti )) != NULL );
}
}


Expanding a branch

--------------------------------------------------------------------------------

The treeview has built in support for expanding expanding the outline one level at a time. If you want to completely expand a branch, the code below will help. It uses recursion to expand all items. The last line, that is, the call to EnsureVisible() is useful when this code is hooked up to a user interface. After expanding the outline branch, the previously selected item may have scrolled off and calling EnsureVisible() brings it back.

// ExpandBranch - Expands a branch completely
// hti - Handle of the tree item to expand
void CTreeCtrlX::ExpandBranch( HTREEITEM hti )
{
if( ItemHasChildren( hti ) ){
Expand( hti, TVE_EXPAND );
hti = GetChildItem( hti );
do{
ExpandBranch( hti );
}while( (hti = GetNextSiblingItem( hti )) != NULL );
}
EnsureVisible( GetSelectedItem() );
}

search more in codeguru and codeproject
GeneralRe: too many items in treeview Pin
Peter Molnar23-Nov-02 12:47
Peter Molnar23-Nov-02 12:47 
QuestionHow/Can I create an array of controls? Pin
VanHlebar23-Nov-02 3:45
VanHlebar23-Nov-02 3:45 
AnswerRe: How/Can I create an array of controls? Pin
Peter Molnar23-Nov-02 4:42
Peter Molnar23-Nov-02 4:42 
GeneralRe: How/Can I create an array of controls? Pin
VanHlebar23-Nov-02 6:11
VanHlebar23-Nov-02 6:11 
GeneralRe: How/Can I create an array of controls? Pin
Paul M Watt23-Nov-02 6:44
mentorPaul M Watt23-Nov-02 6:44 
GeneralRe: How/Can I create an array of controls? Pin
georgiek5023-Nov-02 6:44
georgiek5023-Nov-02 6:44 
GeneralRe: How/Can I create an array of controls? Pin
Peter Molnar23-Nov-02 7:02
Peter Molnar23-Nov-02 7:02 
Generalms word automation Pin
pnpfriend23-Nov-02 3:28
pnpfriend23-Nov-02 3:28 
QuestionHow to control a threads CPU utilization? Pin
mediamaster4023-Nov-02 3:16
mediamaster4023-Nov-02 3:16 
AnswerRe: How to control a threads CPU utilization? Pin
mediamaster4025-Nov-02 3:11
mediamaster4025-Nov-02 3:11 
GeneralCListCtrl - Selection Problem Pin
#realJSOP23-Nov-02 0:54
professional#realJSOP23-Nov-02 0:54 
GeneralRe: CListCtrl - Selection Problem Pin
Gary R. Wheeler23-Nov-02 1:50
Gary R. Wheeler23-Nov-02 1:50 
GeneralRe: CListCtrl - Selection Problem Pin
#realJSOP23-Nov-02 3:22
professional#realJSOP23-Nov-02 3:22 
GeneralRe: CListCtrl - Selection Problem Pin
Jean-Marc Molina3-Oct-03 1:12
Jean-Marc Molina3-Oct-03 1:12 
GeneralDialogues en MFC Pin
bumper23-Nov-02 0:54
bumper23-Nov-02 0:54 
GeneralRe: Dialogues en MFC Pin
Gary R. Wheeler23-Nov-02 2:00
Gary R. Wheeler23-Nov-02 2:00 
GeneralRe: Dialogues en MFC Pin
bumper23-Nov-02 2:40
bumper23-Nov-02 2:40 

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.