I need to obtain selected items located in a window desktop (files and folders) in current moment. I know how to obtain selected items in window explorer using shell32 object and how to get just all desktop items. But how to find out which of them are selected in current moment I don't know.
I find code snippet in question Get selected items of folder with WinAPI. It probably allows to get selected items in desktop but I think that this is hack style code and it can deliver problems on other versions of OS.
UPDATE: I obtain solution but I have problems yet. The problem is that if I create for example 2 files, file1.txt and file1.doc and I set view option "don't show extensions of registered files" then all extensions are removed and I can't obtain what exactly file was selected because I receive only names of files (file1 and file1 without any information). Method gives results without extension. So can anyone know how to solve it?