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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Using TreeView with ImageList (Fixed) [modified]

Using TreeView with ImageList (Fixed) [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
linux
2 Posts 2 Posters 0 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.
  • F Offline
    F Offline
    Fareed Rizkalla
    wrote on last edited by
    #1

    I managed to retrieve my desired icon from shell32.dll. However the icon doesn't appear smooth! :S

    HICON hItem = ExtractIcon(0, L"C:\\Windows\\system32\\shell32.dll", 8); // Full Path for Shell 32
    ImageList_AddIcon( himlIcons, hItem );
    DestroyIcon(hItem);

    Manifest Dependency fixed it!

    modified on Thursday, August 19, 2010 1:43 PM

    N 1 Reply Last reply
    0
    • F Fareed Rizkalla

      I managed to retrieve my desired icon from shell32.dll. However the icon doesn't appear smooth! :S

      HICON hItem = ExtractIcon(0, L"C:\\Windows\\system32\\shell32.dll", 8); // Full Path for Shell 32
      ImageList_AddIcon( himlIcons, hItem );
      DestroyIcon(hItem);

      Manifest Dependency fixed it!

      modified on Thursday, August 19, 2010 1:43 PM

      N Offline
      N Offline
      Niklas L
      wrote on last edited by
      #2

      You will run into trouble if you deploy on a machine with the os installed on a different drive or in a different folder. You would be better off using SHGetFolderPath[^] with a nFolder value of CSIDL_WINDOWS. Then build your path from that. Have look at PathAppend[^] for instance.

      home

      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