Where can I find the default icons used for folders and applications?

前端 未结 8 1804
闹比i
闹比i 2021-01-03 09:49

I\'m trying to load the default HICON that explorer displays for:

  • An open folder
  • An exe that has no embedded default icon of its own. This can also
8条回答
  •  忘掉有多难
    2021-01-03 10:13

    I think they are in %windir%\system32\SHELL32.dll

    Found some code in the internet, try if that works:

    HINSTANCE hDll;
    hDll = LoadLibrary ( "SHELL32.dll" );
    wincl.hIcon   = LoadIcon (hDll , MAKEINTRESOURCE ( 1 ));
    wincl.hIconSm = LoadIcon (hDll, MAKEINTRESOURCE ( 2 ));
    

    Edit: Windows has a lot more icons in the "moricons.dll", but I think the file and folder icons should all be in the shell32.dll. Remind, that icons in Vista have different resolutions, up to 256x256, so the icon you are looking at a resolution 32x32 might look different then the full resolution version of the same icon.

提交回复
热议问题