On Thu, 18 Jan 2007, Frank Richter wrote:
On 18.01.2007 16:23, Francois Gouget wrote:
if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
lstrcpyW(psfi->szDisplayName, swShell32Name);
psfi->iIcon = -IDI_SHELL_FOLDER;
}
At least on Windows, folders have a file type, too - see HKCR\Folder. So maybe use 'HCR_GetDefaultIconW(L"Folder", ...)' when the directory attribute is set, and 'HCR_GetDefaultIconW(sTemp, ...)' otherwise?
Are you sure? I have rigged the test to print the values returned by this SHGetFileInfo() test, and then I modified the HKCR\Folder\DefaultIcon value. However I observed no change in the test output.
It also had no effect on the icon shown in the Windows Explorer.