You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

Top


Contributor
Loading
When you select a file or folder in Explorer window, and choose 'Properties' from the menu, you get the properties window that contains some essential information about the file: The size of file, created date, modified date, attributes, and so on.
It's possible to display this properties window programmatically, by using the ShellExecuteEx API function.
The function below accept 2 parameters, and displays the properties window of the file:
hwnd - The handle of the window that calls this function.
lpszFile - The file or folder that you want to display its properties.
Code:

void ShowFileProperties(HWND hwnd, LPSTR lpszFile)
{
   SHELLEXECUTEINFO ShExecInfo = {0};

   ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
   ShExecInfo.fMask = SEE_MASK_INVOKEIDLIST ;
   ShExecInfo.hwnd = hwnd;
   ShExecInfo.lpVerb = "properties";
   ShExecInfo.lpFile = lpszFile;
   ShExecInfo.lpParameters = "";
   ShExecInfo.lpDirectory = NULL;
   ShExecInfo.nShow = SW_SHOW;
   ShExecInfo.hInstApp = NULL;
   ShellExecuteEx(&ShExecInfo);
}

View previous topic View next topic Back to top  Message [Page 1 of 1]

Related topics

Permissions in this forum:
You cannot reply to topics in this forum