CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Posts
    756

    Question Default file icon

    Hi, ALL,
    If I don't assign the icon to my executable file (f.e. it's a DOS application), or I have some unknown extension in the file, Windows Explorer assigns the icon to this file.

    Is there a way to somehow get this icon? Either from the registry or by any other means.

    Thank you.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Default file icon

    The simplest and fastes way - using Windows Explorer, menu Tools | Folder Options | File Type (in XP)
    or context menu (with Shift) | Open with | Choose default program... (Windows 7)
    Victor Nijegorodov

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Default file icon

    Victor Nijegorodov

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Default file icon

    Quote Originally Posted by OneEyeMan View Post
    Hi, ALL,
    If I don't assign the icon to my executable file (f.e. it's a DOS application), or I have some unknown extension in the file, Windows Explorer assigns the icon to this file.

    Is there a way to somehow get this icon? Either from the registry or by any other means.
    In case I get you correct, the answer is SHGetFileInfo, SHGFI_ICON or SHGFI_SMALLICON. Though I'm not sure about your "get this icon" exact meaning.
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured