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. Windows API
  4. Desktop icon delete problem on Windows 7

Desktop icon delete problem on Windows 7

Scheduled Pinned Locked Moved Windows API
databasehelpquestion
4 Posts 3 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.
  • S Offline
    S Offline
    San2468
    wrote on last edited by
    #1

    Hi All, I want to programmatically delete a particular desktop icon; I am doing this by using ListView_DeleteItem. But Windows 7 added LVS_OWNERDATA style to desktop's list view. MSDN says ListView_DeleteItem is supported for selection integrity only and does not actually delete an item but it deletes some other icon ignoring the index provided. Is there any other way to delete a particular desktop icon? I am looking for some other way than setting hidden attribute or moving an icon from desktop directory. Is it possible by using IShellFolderView::RemoveObject method? Thanks.

    M 1 Reply Last reply
    0
    • S San2468

      Hi All, I want to programmatically delete a particular desktop icon; I am doing this by using ListView_DeleteItem. But Windows 7 added LVS_OWNERDATA style to desktop's list view. MSDN says ListView_DeleteItem is supported for selection integrity only and does not actually delete an item but it deletes some other icon ignoring the index provided. Is there any other way to delete a particular desktop icon? I am looking for some other way than setting hidden attribute or moving an icon from desktop directory. Is it possible by using IShellFolderView::RemoveObject method? Thanks.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Which icon exactly? If it's one of the built-in icons, then you'll have better luck looking at the Group Policy editor. There's probably a setting in there to hide the icon.

      --Mike-- Dunder-Mifflin, this is Pam

      S 1 Reply Last reply
      0
      • M Michael Dunn

        Which icon exactly? If it's one of the built-in icons, then you'll have better luck looking at the Group Policy editor. There's probably a setting in there to hide the icon.

        --Mike-- Dunder-Mifflin, this is Pam

        S Offline
        S Offline
        San2468
        wrote on last edited by
        #3

        Thanks Mike but I am also looking for hiding icons created by user, anyways now I can at least hide built in icons. Thanks.

        S 1 Reply Last reply
        0
        • S San2468

          Thanks Mike but I am also looking for hiding icons created by user, anyways now I can at least hide built in icons. Thanks.

          S Offline
          S Offline
          Saksida Bojan
          wrote on last edited by
          #4

          you can delete if you delete .lnk file from disk. for Desktop it is located in c:\Users\'YOUR ACCOUNT NAME'\Desktop Or if all accounts have same icon, it is located in: C:\Users\All Users\Desktop

          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