SlideShare a Scribd company logo
Tree
Add the following variables:
Ctrl ID Var name Category Var type
IDC_EDIT1 m_str Value CString
IDC_TREE1 m_ctrlTree Control CTreeCtrl
In TreeDlg.h declare the member var:
………..
public:
CString m_str;
CTreeCtrl m_ctrlTree;
CImageList m_image;
};
Initialize the var in CTreeDlg::OnInitDialog()
…………………
// TODO: Add extra initialization here
m_image.Create(IDB_BITMAP1, 16, 1, RGB(12, 15, 18));
m_ctrlTree.SetImageList(&m_image, TVSIL_NORMAL);
return TRUE; // return TRUE unless you set the focus to a control
}
void CTreeDlg::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_ctrlTree.InsertItem(m_str, 0, 1, TVI_ROOT);
m_ctrlTree.SetFocus();
}
void CTreeDlg::OnBnClickedButton2()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
HTREEITEM ht = m_ctrlTree.GetSelectedItem();
m_ctrlTree.InsertItem(m_str, 0, 1, ht);
m_ctrlTree.SetFocus();
}
MFC Tree

More Related Content

What's hot

MFC Slider
MFC SliderMFC Slider
Gradient boosting in practice: a deep dive into xgboost
Gradient boosting in practice: a deep dive into xgboostGradient boosting in practice: a deep dive into xgboost
Gradient boosting in practice: a deep dive into xgboost
Jaroslaw Szymczak
 
Calc 7.1b
Calc 7.1bCalc 7.1b
Calc 7.1b
hartcher
 
Day 6 examples
Day 6 examplesDay 6 examples
Day 6 examples
jchartiersjsd
 
Day 7 examples u6w14
Day 7 examples u6w14Day 7 examples u6w14
Day 7 examples u6w14
jchartiersjsd
 
Goal programming
Goal programmingGoal programming
Goal programming
Hakeem-Ur- Rehman
 
Types of function
Types of function Types of function
Types of function
SanaullahMemon10
 
Master defence 2020 - Vadym Korshunov - Region-Selected Image Generation with...
Master defence 2020 - Vadym Korshunov - Region-Selected Image Generation with...Master defence 2020 - Vadym Korshunov - Region-Selected Image Generation with...
Master defence 2020 - Vadym Korshunov - Region-Selected Image Generation with...
Lviv Data Science Summer School
 
multiple linear regression
multiple linear regressionmultiple linear regression
multiple linear regression
Akhilesh Joshi
 
Dip 1
Dip 1Dip 1
Distributed Support Vector Machines
Distributed Support Vector MachinesDistributed Support Vector Machines
Distributed Support Vector Machines
Harsha Vardhan Tetali
 
Linear Programming Feasible Region
Linear Programming Feasible RegionLinear Programming Feasible Region
Linear Programming Feasible Region
VARUN MODI
 
A Tutorial On Ip 1
A Tutorial On Ip 1A Tutorial On Ip 1
A Tutorial On Ip 1
ankuredkie
 
Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)
Hansol Kang
 
Integer Programming, Gomory
Integer Programming, GomoryInteger Programming, Gomory
Integer Programming, Gomory
AVINASH JURIANI
 
Introduction to graphics programming in c
Introduction to graphics programming in cIntroduction to graphics programming in c
Introduction to graphics programming in c
baabtra.com - No. 1 supplier of quality freshers
 
Forms of Quadratics
Forms of QuadraticsForms of Quadratics
Forms of Quadratics
mrodolewicz
 
2 transformation computer graphics
2 transformation computer graphics2 transformation computer graphics
2 transformation computer graphics
cairo university
 
การทำหิมะตกใน Flash
การทำหิมะตกใน Flashการทำหิมะตกใน Flash
การทำหิมะตกใน Flash
ลูกแก้ว กนกวรรณ
 

What's hot (19)

MFC Slider
MFC SliderMFC Slider
MFC Slider
 
Gradient boosting in practice: a deep dive into xgboost
Gradient boosting in practice: a deep dive into xgboostGradient boosting in practice: a deep dive into xgboost
Gradient boosting in practice: a deep dive into xgboost
 
Calc 7.1b
Calc 7.1bCalc 7.1b
Calc 7.1b
 
Day 6 examples
Day 6 examplesDay 6 examples
Day 6 examples
 
Day 7 examples u6w14
Day 7 examples u6w14Day 7 examples u6w14
Day 7 examples u6w14
 
Goal programming
Goal programmingGoal programming
Goal programming
 
Types of function
Types of function Types of function
Types of function
 
Master defence 2020 - Vadym Korshunov - Region-Selected Image Generation with...
Master defence 2020 - Vadym Korshunov - Region-Selected Image Generation with...Master defence 2020 - Vadym Korshunov - Region-Selected Image Generation with...
Master defence 2020 - Vadym Korshunov - Region-Selected Image Generation with...
 
multiple linear regression
multiple linear regressionmultiple linear regression
multiple linear regression
 
Dip 1
Dip 1Dip 1
Dip 1
 
Distributed Support Vector Machines
Distributed Support Vector MachinesDistributed Support Vector Machines
Distributed Support Vector Machines
 
Linear Programming Feasible Region
Linear Programming Feasible RegionLinear Programming Feasible Region
Linear Programming Feasible Region
 
A Tutorial On Ip 1
A Tutorial On Ip 1A Tutorial On Ip 1
A Tutorial On Ip 1
 
Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)
 
Integer Programming, Gomory
Integer Programming, GomoryInteger Programming, Gomory
Integer Programming, Gomory
 
Introduction to graphics programming in c
Introduction to graphics programming in cIntroduction to graphics programming in c
Introduction to graphics programming in c
 
Forms of Quadratics
Forms of QuadraticsForms of Quadratics
Forms of Quadratics
 
2 transformation computer graphics
2 transformation computer graphics2 transformation computer graphics
2 transformation computer graphics
 
การทำหิมะตกใน Flash
การทำหิมะตกใน Flashการทำหิมะตกใน Flash
การทำหิมะตกใน Flash
 

Similar to MFC Tree

MFC List
MFC ListMFC List
MFC Bitmap
MFC BitmapMFC Bitmap
MFC Calculator 2
MFC Calculator 2MFC Calculator 2
MFC Calculator 2
Razvan Raducanu, PhD
 
MFC Pen
MFC PenMFC Pen
MFC Rect1
MFC Rect1MFC Rect1
MFC Letter
MFC LetterMFC Letter
Introduction to cython: example of GCoptimization
Introduction to cython: example of GCoptimizationIntroduction to cython: example of GCoptimization
Introduction to cython: example of GCoptimization
Kevin Keraudren
 
Program to print array elements using System; namespace Retai.pdf
 Program to print array elements using System; namespace Retai.pdf Program to print array elements using System; namespace Retai.pdf
Program to print array elements using System; namespace Retai.pdf
appsmobileshoppe
 
PROGRAM KONVERSI CITRA BERWARNA MENJADI CITRA GRAYSCALE
PROGRAM KONVERSI CITRA BERWARNA MENJADI  CITRA GRAYSCALEPROGRAM KONVERSI CITRA BERWARNA MENJADI  CITRA GRAYSCALE
PROGRAM KONVERSI CITRA BERWARNA MENJADI CITRA GRAYSCALE
Lesmardin Hasugian
 

Similar to MFC Tree (9)

MFC List
MFC ListMFC List
MFC List
 
MFC Bitmap
MFC BitmapMFC Bitmap
MFC Bitmap
 
MFC Calculator 2
MFC Calculator 2MFC Calculator 2
MFC Calculator 2
 
MFC Pen
MFC PenMFC Pen
MFC Pen
 
MFC Rect1
MFC Rect1MFC Rect1
MFC Rect1
 
MFC Letter
MFC LetterMFC Letter
MFC Letter
 
Introduction to cython: example of GCoptimization
Introduction to cython: example of GCoptimizationIntroduction to cython: example of GCoptimization
Introduction to cython: example of GCoptimization
 
Program to print array elements using System; namespace Retai.pdf
 Program to print array elements using System; namespace Retai.pdf Program to print array elements using System; namespace Retai.pdf
Program to print array elements using System; namespace Retai.pdf
 
PROGRAM KONVERSI CITRA BERWARNA MENJADI CITRA GRAYSCALE
PROGRAM KONVERSI CITRA BERWARNA MENJADI  CITRA GRAYSCALEPROGRAM KONVERSI CITRA BERWARNA MENJADI  CITRA GRAYSCALE
PROGRAM KONVERSI CITRA BERWARNA MENJADI CITRA GRAYSCALE
 

More from Razvan Raducanu, PhD

12. edit record
12. edit record12. edit record
12. edit record
Razvan Raducanu, PhD
 
11. delete record
11. delete record11. delete record
11. delete record
Razvan Raducanu, PhD
 
10. view one record
10. view one record10. view one record
10. view one record
Razvan Raducanu, PhD
 
9. add new record
9. add new record9. add new record
9. add new record
Razvan Raducanu, PhD
 
8. vederea inregistrarilor
8. vederea inregistrarilor8. vederea inregistrarilor
8. vederea inregistrarilor
Razvan Raducanu, PhD
 
7. copy1
7. copy17. copy1
6. hello popescu 2
6. hello popescu 26. hello popescu 2
6. hello popescu 2
Razvan Raducanu, PhD
 
5. hello popescu
5. hello popescu5. hello popescu
5. hello popescu
Razvan Raducanu, PhD
 
4. forme in zend framework 3
4. forme in zend framework 34. forme in zend framework 3
4. forme in zend framework 3
Razvan Raducanu, PhD
 
3. trimiterea datelor la vederi
3. trimiterea datelor la vederi3. trimiterea datelor la vederi
3. trimiterea datelor la vederi
Razvan Raducanu, PhD
 
2.routing in zend framework 3
2.routing in zend framework 32.routing in zend framework 3
2.routing in zend framework 3
Razvan Raducanu, PhD
 
1. zend framework intro
1. zend framework intro1. zend framework intro
1. zend framework intro
Razvan Raducanu, PhD
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
Razvan Raducanu, PhD
 
17. delete data
17. delete data17. delete data
17. delete data
Razvan Raducanu, PhD
 
16. edit data
16. edit data16. edit data
16. edit data
Razvan Raducanu, PhD
 
15. view single data
15. view single data15. view single data
15. view single data
Razvan Raducanu, PhD
 
14. add data in symfony4
14. add data in symfony4 14. add data in symfony4
14. add data in symfony4
Razvan Raducanu, PhD
 
13. view data
13. view data13. view data
13. view data
Razvan Raducanu, PhD
 
12.doctrine view data
12.doctrine view data12.doctrine view data
12.doctrine view data
Razvan Raducanu, PhD
 
11. move in Symfony 4
11. move in Symfony 411. move in Symfony 4
11. move in Symfony 4
Razvan Raducanu, PhD
 

More from Razvan Raducanu, PhD (20)

12. edit record
12. edit record12. edit record
12. edit record
 
11. delete record
11. delete record11. delete record
11. delete record
 
10. view one record
10. view one record10. view one record
10. view one record
 
9. add new record
9. add new record9. add new record
9. add new record
 
8. vederea inregistrarilor
8. vederea inregistrarilor8. vederea inregistrarilor
8. vederea inregistrarilor
 
7. copy1
7. copy17. copy1
7. copy1
 
6. hello popescu 2
6. hello popescu 26. hello popescu 2
6. hello popescu 2
 
5. hello popescu
5. hello popescu5. hello popescu
5. hello popescu
 
4. forme in zend framework 3
4. forme in zend framework 34. forme in zend framework 3
4. forme in zend framework 3
 
3. trimiterea datelor la vederi
3. trimiterea datelor la vederi3. trimiterea datelor la vederi
3. trimiterea datelor la vederi
 
2.routing in zend framework 3
2.routing in zend framework 32.routing in zend framework 3
2.routing in zend framework 3
 
1. zend framework intro
1. zend framework intro1. zend framework intro
1. zend framework intro
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
 
17. delete data
17. delete data17. delete data
17. delete data
 
16. edit data
16. edit data16. edit data
16. edit data
 
15. view single data
15. view single data15. view single data
15. view single data
 
14. add data in symfony4
14. add data in symfony4 14. add data in symfony4
14. add data in symfony4
 
13. view data
13. view data13. view data
13. view data
 
12.doctrine view data
12.doctrine view data12.doctrine view data
12.doctrine view data
 
11. move in Symfony 4
11. move in Symfony 411. move in Symfony 4
11. move in Symfony 4
 

Recently uploaded

Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 

Recently uploaded (20)

Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 

MFC Tree

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Add the following variables: Ctrl ID Var name Category Var type IDC_EDIT1 m_str Value CString IDC_TREE1 m_ctrlTree Control CTreeCtrl
  • 15. In TreeDlg.h declare the member var: ……….. public: CString m_str; CTreeCtrl m_ctrlTree; CImageList m_image; };
  • 16. Initialize the var in CTreeDlg::OnInitDialog() ………………… // TODO: Add extra initialization here m_image.Create(IDB_BITMAP1, 16, 1, RGB(12, 15, 18)); m_ctrlTree.SetImageList(&m_image, TVSIL_NORMAL); return TRUE; // return TRUE unless you set the focus to a control }
  • 17.
  • 18.
  • 19. void CTreeDlg::OnBnClickedButton1() { // TODO: Add your control notification handler code here UpdateData(TRUE); m_ctrlTree.InsertItem(m_str, 0, 1, TVI_ROOT); m_ctrlTree.SetFocus(); }
  • 20.
  • 21.
  • 22. void CTreeDlg::OnBnClickedButton2() { // TODO: Add your control notification handler code here UpdateData(TRUE); HTREEITEM ht = m_ctrlTree.GetSelectedItem(); m_ctrlTree.InsertItem(m_str, 0, 1, ht); m_ctrlTree.SetFocus(); }