MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / GetDefaultIcon

Function GetDefaultIcon

Explorer++/Helper/ShellHelper.cpp:386–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386int GetDefaultIcon(DefaultIconType defaultIconType)
387{
388 SHFILEINFO shfi;
389 DWORD dwFileAttributes;
390
391 switch (defaultIconType)
392 {
393 case DEFAULT_ICON_FOLDER:
394 dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_NORMAL;
395 break;
396
397 case DEFAULT_ICON_FILE:
398 default:
399 dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
400 break;
401 }
402
403 /* Under unicode, the filename argument cannot be NULL,
404 as it is not a valid unicode character. */
405 SHGetFileInfo(_T("dummy"), dwFileAttributes, &shfi, sizeof(SHFILEINFO),
406 SHGFI_SYSICONINDEX | SHGFI_USEFILEATTRIBUTES);
407
408 return shfi.iIcon;
409}
410
411BOOL MyExpandEnvironmentStrings(const TCHAR *szSrc, TCHAR *szExpandedPath, DWORD nSize)
412{

Callers 2

GetDefaultFileIconIndexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected