Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Need Help....

Need Help....

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rajeevktripathi
    wrote on last edited by
    #1

    Hi All I want to find the icon associated with all the file extensions and if no valid extension is there then find the generic icon provided by the system for unknown file extension. Please help me to do this... Thanks

    J P 2 Replies Last reply
    0
    • R rajeevktripathi

      Hi All I want to find the icon associated with all the file extensions and if no valid extension is there then find the generic icon provided by the system for unknown file extension. Please help me to do this... Thanks

      J Offline
      J Offline
      James R Twine
      wrote on last edited by
      #2

      Look up SHGetFileInfo(...) and articles like the following: http://www.codeproject.com/shell/shellicon.asp[^] http://www.codeproject.com/shell/diriconexample.asp[^]    Peace!

      -=- James
      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      See DeleteFXPFiles

      R 1 Reply Last reply
      0
      • R rajeevktripathi

        Hi All I want to find the icon associated with all the file extensions and if no valid extension is there then find the generic icon provided by the system for unknown file extension. Please help me to do this... Thanks

        P Offline
        P Offline
        Programm3r
        wrote on last edited by
        #3

        I use the ExtractIcon() function, maybe it can help you... This is just an example ...BOOL foo_notifyIcon() { ZeroMemory(&niData,sizeof(NOTIFYICONDATA)); niData.uFlags = NIF_ICON|NIF_MESSAGE|NIF_TIP; hModule = GetModuleHandle((LPCSTR)"executablename.extension"); ico = ExtractIcon(hModule, (LPCSTR)"C:\\windows\\system32\\shell32.dll",18); niData.hIcon=ico; BOOL rc = Shell_NotifyIcon(NIM_ADD,&niData); return rc; }
        Regards,


        The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :)Programm3r My Blog: ^_^

        1 Reply Last reply
        0
        • J James R Twine

          Look up SHGetFileInfo(...) and articles like the following: http://www.codeproject.com/shell/shellicon.asp[^] http://www.codeproject.com/shell/diriconexample.asp[^]    Peace!

          -=- James
          Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
          Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
          See DeleteFXPFiles

          R Offline
          R Offline
          rajeevktripathi
          wrote on last edited by
          #4

          Hi Thanks for your reply Infact what I want is to find the icon of a file which is i am recieving from the remote system so I have ony file name (e.g. Test.txt, Test.pdf, etc) So I need to find the icon associated with file extensions like .txt, .pdf, etc. that means I dont have full path of the file... So please help me for solving this problem.... Thanks & Regards

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups