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

前端 未结 8 1725
闹比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:14

    If you are in MFC, following code for loading icons should work.

    
        HICON hicon;
        hicon = LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ICON1));   
    

    In the above example, AfxGetResourceHandle() is the only thing where MFC is used, otherwise LoadIcon is an API call as far as I remember.

    Icons are available in windows\system32\shell32.dll

    If you have visual studio installed, then visual studio is also shipped with a set of icons at a path like this "C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary"

提交回复
热议问题