CImageList:可以用于给TreeCtrl节点添加Icon
创建ImageList 16 * 16的, 8色,初始化为9个,增长频率是9
m_pImageList.Create(16, 16, ILC_COLOR8 | ILC_MASK,  9, 9);
向ImageList中添加Icon
m_pImageList.Add(pApp->LoadIcon(ICO_CDDRV));
m_pImageList.Add(pApp->LoadIcon(ICO_CLSDFLD));
m_pImageList.Add(pApp->LoadIcon(ICO_DRIVE));
m_pImageList.Add(pApp->LoadIcon(ICO_FLOPPYDRV));
m_pImageList.Add(pApp->LoadIcon(ICO_MYCOMP));
m_pImageList.Add(pApp->LoadIcon(ICO_OPENFLD));
m_pImageList.Add(pApp->LoadIcon(ICO_TEXTFILE));
向TreeCtrl添加ImageList
GetTreeCtrl().SetImageList(&m_pImageList , TVSIL_NORMAL);

GetLogicalDrives Function

Retrieves a bitmask representing the currently available disk drives.

 

DWORD WINAPI GetLogicalDrives(void);


GetDriveType Function

 

Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.

To determine whether a drive is a USB-type drive, call SetupDiGetDeviceRegistryProperty and specify the SPDRP_REMOVAL_POLICY property.

 

UINT WINAPI GetDriveType(
  __in          LPCTSTR lpRootPathName
);