-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Milestone
Description
Is your feature request related to a problem? Please describe.
On a Win10 system, the file extension "html" resolves the icon to C:\Program Files\Internet Explorer\iexplore.exe, -17. For my system, this is highly inaccurate since I do have Google Chrome installed as the default browser.
Describe the solution you'd like
The default icon should resolve to C:\Program Files\Google\Chrome\Application\chrome.exe, 0. Another way of putting it, would be to get the same icon as you do with File Explorer when you create a blank file with file extension. You want to get the same icon as the file.
Describe alternatives you've considered
- We should leave the actual implementation available as a legacy feature.
- Implementing a new resolution algorithm based on ExtractAssociatedIconExW with the following code as example :
HINSTANCE hInstance = GetModuleHandle(NULL);
char buffer[MAX_PATH];
sprintf(buffer, "E:\\Temp\\tmp.html");
WORD index = 0;
WORD id = 0;
HICON hIcon = ExtractAssociatedIconExA(hInstance, buffer, &index, &id);
if ( hIcon == NULL )
{
DWORD dwLastError = GetLastError();
printf("dwLastError = 0x%x", dwLastError);
}
if ( hIcon != NULL )
DestroyIcon(hIcon);Note that file E:\Temp\tmp.html must exists on system for the resolution to be successful.
Additional context
N/A
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request