Generally directory tree with check boxes is needed while creating an anti-viral software in which user can check or uncheck the directories depending upon whether he wants to scan the directory or not.
Check boxes actually are bitmaps using which image list is created and images are loaded depending on the status (Checked/Unchecked) of the directory.
In this program, firstly only the drives are displayed with checked status. When user double clicks on the label or clicks on the plus sign the tree is expanded and directories of that drive are displayed in. Since the drive is checked all the directories also are displayed with checked sign. Now if the drive is unchecked all the directories also become unchecked.
This control only displays directories. You can anytime modify this program to display files of the selected directory.