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. Showing properties of MULTIPLE files

Showing properties of MULTIPLE files

Scheduled Pinned Locked Moved C / C++ / MFC
linuxhelp
4 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.
  • T Offline
    T Offline
    tabor25
    wrote on last edited by
    #1

    Hello, when you select more than one file in the windows-explorer you can show the properties by right-clicking and choosing the item "Properties" in the shell-menu. I need to be able to do this within my application. I use the ShellExecuteEx-function to accomplish this task. But the problem is that i can only show the properties for the first selected file. I did a google-search and tried also msdn. Maybe someone has an idee. Best regards Tabor25

    D 1 Reply Last reply
    0
    • T tabor25

      Hello, when you select more than one file in the windows-explorer you can show the properties by right-clicking and choosing the item "Properties" in the shell-menu. I need to be able to do this within my application. I use the ShellExecuteEx-function to accomplish this task. But the problem is that i can only show the properties for the first selected file. I did a google-search and tried also msdn. Maybe someone has an idee. Best regards Tabor25

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      tabor25 wrote: I use the ShellExecuteEx-function to accomplish this task. What does this code look like?


      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

      T 1 Reply Last reply
      0
      • D David Crow

        tabor25 wrote: I use the ShellExecuteEx-function to accomplish this task. What does this code look like?


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        T Offline
        T Offline
        tabor25
        wrote on last edited by
        #3

        Hallo David, the code looks like this: CString file = ""; POSITION pos = m_fileList.GetFirstSelectedItemPosition(); if (pos) { file = m_fileTree.GetPath() + m_fileList.GetItemText(m_fileList.GetNextSelectedItem(pos), 0) + '\0'; } if (file.GetLength()) { SHELLEXECUTEINFO a_stInfo; memset( &a_stInfo, 0, sizeof( a_stInfo ) ); a_stInfo.cbSize = sizeof( a_stInfo ); a_stInfo.lpVerb = _T("properties"); a_stInfo.lpFile = _T(file); a_stInfo.fMask = SEE_MASK_INVOKEIDLIST; ShellExecuteEx( &a_stInfo ); } The member lpFile of the structure seems to carry only one filename. I tried to separate all selected files by using semicolon or \0 but without success. So at the moment i will show only the properties of the first selected file. Maybe you or someone else has an idea... Best regards Tabor25

        D 1 Reply Last reply
        0
        • T tabor25

          Hallo David, the code looks like this: CString file = ""; POSITION pos = m_fileList.GetFirstSelectedItemPosition(); if (pos) { file = m_fileTree.GetPath() + m_fileList.GetItemText(m_fileList.GetNextSelectedItem(pos), 0) + '\0'; } if (file.GetLength()) { SHELLEXECUTEINFO a_stInfo; memset( &a_stInfo, 0, sizeof( a_stInfo ) ); a_stInfo.cbSize = sizeof( a_stInfo ); a_stInfo.lpVerb = _T("properties"); a_stInfo.lpFile = _T(file); a_stInfo.fMask = SEE_MASK_INVOKEIDLIST; ShellExecuteEx( &a_stInfo ); } The member lpFile of the structure seems to carry only one filename. I tried to separate all selected files by using semicolon or \0 but without success. So at the moment i will show only the properties of the first selected file. Maybe you or someone else has an idea... Best regards Tabor25

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          tabor25 wrote: Maybe you or someone else has an idea... Try IShellFolder::GetAttributesOf() instead.


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

          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