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