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. File properties

File properties

Scheduled Pinned Locked Moved C / C++ / MFC
algorithmsquestion
5 Posts 4 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.
  • B Offline
    B Offline
    Bugra Barin
    wrote on last edited by
    #1

    I want to view / edit the properties of a file programmatically. By properties, I mean the properties you see under right click / properties / summary tab (title, author, summary, etc). I've been searching MSDN but no luck so far. Any suggestions ?

    R J 2 Replies Last reply
    0
    • B Bugra Barin

      I want to view / edit the properties of a file programmatically. By properties, I mean the properties you see under right click / properties / summary tab (title, author, summary, etc). I've been searching MSDN but no luck so far. Any suggestions ?

      R Offline
      R Offline
      RedZenBird
      wrote on last edited by
      #2

      GetFileAttributes / SetFileAttributes GetFileSize GetFileType GetFileInformationByHandle (could be the best one to research?) Just trying to keep the forces of entropy at bay

      B 1 Reply Last reply
      0
      • R RedZenBird

        GetFileAttributes / SetFileAttributes GetFileSize GetFileType GetFileInformationByHandle (could be the best one to research?) Just trying to keep the forces of entropy at bay

        B Offline
        B Offline
        Bugra Barin
        wrote on last edited by
        #3

        Thanks, not really what I'm looking for. It's amazing that I've been searching for hours now and couldn't find any info on this. I was hoping for a simple API function.

        S 1 Reply Last reply
        0
        • B Bugra Barin

          Thanks, not really what I'm looking for. It's amazing that I've been searching for hours now and couldn't find any info on this. I was hoping for a simple API function.

          S Offline
          S Offline
          Steve S
          wrote on last edited by
          #4

          That stuff only normally appears if it's a compound file (OLE "document"). I think there's a sample on MSDN that deals with examining these. Try looking for properties and "structured storage" or some such. Steve S [This signature space available for rent]

          1 Reply Last reply
          0
          • B Bugra Barin

            I want to view / edit the properties of a file programmatically. By properties, I mean the properties you see under right click / properties / summary tab (title, author, summary, etc). I've been searching MSDN but no luck so far. Any suggestions ?

            J Offline
            J Offline
            Jawache
            wrote on last edited by
            #5

            I don't think its as simple as you think, i've been meaning to go through this for a while and do somthing similar (get the Map NetworkDrive dialog), heres what i have found so far, you need to get a IContextMenu handle and then fill a CMININVOKECOMMANDINFO structure like bellow. You need to fill in the correct verb, in the code (snipped from seashell project - see shell extentions section in CP.) bellow it sets the verb by T2CA(MAKEINTRESOURCE(iCmd - IDM_SHELLCTXFIRST)); SHELLCTXFIRST = 2000, the iCmd is the cmd id returned by the context menu command. I'm presuming that the value of iCmd will not change per platform. If you can find the value of iCmd that is the verb "properties" then i think you could bring up that dialog. To Get IContextMenu you call IShellFolder::GetUIObjectOf.. see msdn. 00336 CMINVOKECOMMANDINFO cmi; 00337 cmi.cbSize = sizeof(cmi); 00338 cmi.fMask = 0; 00339 cmi.hwnd = m_hWnd; 00340 cmi.lpVerb = T2CA(MAKEINTRESOURCE(iCmd - IDM_SHELLCTXFIRST)); 00341 cmi.lpParameters = NULL; 00342 cmi.lpDirectory = NULL; 00343 cmi.nShow = SW_SHOWNORMAL; 00344 cmi.dwHotKey = 0; 00345 cmi.hIcon = NULL; 00346 m_lpcm->InvokeCommand(&cmi); Asim Hussain e: asim@jawache.net w: www.jawache.net

            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