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. SetNameOf

SetNameOf

Scheduled Pinned Locked Moved C / C++ / MFC
question
1 Posts 1 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.
  • A Offline
    A Offline
    Arjan Schouten
    wrote on last edited by
    #1

    I'm using the SetNameOf function to rename a folder relative to its parent folder. The Renaming works well but the pidl I get back is not the one I expect. When I rename C:\Foo\Bar to C:\Foo\Bar.temp the pidl I get back corresponds to C:\Documents and Settings\Arjan\Desktop\Bar.temp LPCOLESTR lpNewName = A2OLE(GetItemText(m_hLockedItem)); LPITEMIDLIST pidlNew; HRESULT hr = pParentFolder->SetNameOf(AfxGetMainWnd()->GetSafeHwnd(), pidlRel, lpNewName, SHGDN_INFOLDER, &pidlNew); CString s; SHGetPathFromIDList(pidlNew, s.GetBuffer(MAX_PATH)); s.ReleaseBuffer(); What am I doing wrong here? Thanks, Arjan.

    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