IShellExtInit and IContextMenu;
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
How does one find out if items right clicked is a file class or folder class? Thank You Bo Hunter
Hi Hunter, Hope this will help you. WIN32_FIND_DATA wFindData; ZeroMemory(&wFindData,sizeof(WIN32_FIND_DATA)); hResult = SHGetDataFromIDList(pShellFolder,pPIDL,SHGDFIL_FINDDATA,&wFindData,sizeof(WIN32_FIND_DATA)); In this, pShellFolder is the Address of parent folder and pPIDL is the PIDL corrosponding to the selected item. if (wFindData.dwFileAttributes && FILE_ATTRIBUTE_DIRECTORY) { // It is a directory!. } else { // It is a file!. } Regards Dinesh