I did tried that approach and haven't found any benefits over the one i used in the fix - it is neither faster nor more accurate. You see - this approach only works in the case when we can find the file that contains resource that is associated with the target and in this case system
call for retrieving different resolution icons work better.

/Alex

On 8/28/20 4:12 PM, Sergey Bylokhov wrote:
On 29.05.2020 14:35, Alexey Ivanov wrote:
The ultimate goal of this API could be to provide an MRI which stores all the available icon sizes and loads dynamically the size that's most appropriate to the current display settings. Raymond Chen has a blog post about the format of the icon resources [1]. If we do that, we will handle all the scaling ourselves and will be able to define our own algorithm for choosing the closest match. As explained in LookupIconIdFromDirectoryEx [2], LoadIcon and LoadImage “use this function to search the specified resource data for the icon… that best fits the current display device.”> [1] https://devblogs.microsoft.com/oldnewthing/20120720-00/?p=7083 [2] https://docs.microsoft.com/en-ie/windows/win32/api/winuser/nf-winuser-lookupiconidfromdirectoryex

Did any body check that the approach from the blog post works?



Reply via email to