How to obtain virtual folder icons such as "My computer"

Source: Internet
Author: User

When we writeProgramI may need to use system icons such as my computer. How can I obtain these icons for my use?

After searching over the Internet, it is found that most files are extracticonex, such as assumer.exe, shell32.dll, and so on. However, the positions (sequence) of these file icons may not necessarily remain the same for the operating system.

Then I suddenly found out that since these icons are available when implementing the directory tree, isn't this method more direct?

The general process is as follows: first use getsystemimagelist to obtain the system image list handle, then use shgetspecialfolderlocation to obtain the pidl of these system virtual folders, and then use shgetfileinfo to obtain a shfileinfo structure based on the shgfi_sysiconindex mark transmitted. iicon is what we need. To use these icons, use imagelist_geticon.

I personally think this method is the most concise and clear. Welcome to the discussion.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.