System icon

xiaoxiao2021-03-06  42

Take all systems: himlsmall = (himagelist) Shgetfileinfo ((LPCTSTR) _T ("C: //"), 0, & SFI, SIZEOF (SHFILEINFO), SHGFI_SYSICIONDEX | SHGFI_SMALLICON; take small icon, C disk is a system disk, then You can use the HResult ShgetSpecialFolderLocation (HWnd Hwndowner, INT NFOLDER, LPILDER assignment csidl_drives, using lpitemidlist * ppidl

DWORD_PTR SHGetFileInfo (LPCTSTR pszPath, DWORD dwFileAttributes, SHFILEINFO * psfi, UINT cbFileInfo, UINT uFlags); and to manipulate the HIMAGELIST directly select specific first try with HRESULT SHGetSpecialFolderLocation (HWND hwndOwner, int nFolder, LPITEMIDLIST * ppidl); nFolder assignment CSIDL_DRIVES, use LPItemidList * PPIDL below

DWORD_PTR SHGetFileInfo (LPCTSTR pszPath, DWORD dwFileAttributes, SHFILEINFO * psfi, UINT cbFileInfo, UINT uFlags); it is the third parameter typedef struct _SHFILEINFO {HICON hIcon; int iIcon; DWORD dwAttributes; TCHAR szDisplayName [MAX_PATH]; TCHAR szTypeName [80] } SHFILEINFO; HICON, this is an icon handle, you can use it, it should be my computer icon

转载请注明原文地址:https://www.9cbs.com/read-73352.html

New Post(0)