المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : The application cannot get the file icon



C++ Programming
04-21-2011, 04:44 PM
SHFILEINFO sInfo; ZeroMemory(&sInfo,sizeof(sInfo)); SHGetFileInfo(csFileType, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON); if (sInfo.hIcon) DestroyIcon(sInfo.hIcon); the value of csFileType is .zip .bak .txt or other file type. I debug the program, the value of sInfo.iIcon is 5, 4, or 7
If use this API SHGetFileInfo, need it do any initialize operation ?