get the actual selected file in windows explorer???
-
hi, following problem: i trace the actual front window with GetForegroundWindow(), then look up, if its classname is "CabinetWClass" or "ExploreWClass", witch are the explorer window-classes. ok, so far, so good. then i subclass the "SysListView32" if it exists by passing through the CWnd-childwindows with EnumChildWindows(..., ...) - fine, works! i subclass the resulting CListView of the explorer-window and subclass its CListCtrl - ok - i can get the index of the selected item with .GetSelectonMark(). all functions work like .GetSelectionCount() and so on... but the function .GetItemText(item, subitem) dosen´t work - also the .GetItem(&pItem) dosent return the filename of the selected file... so what??? anyone have an idea? what i try to do: i want to check out if specific files are selected in the windows-explorer-windows - if they are selected, i want to run a action... :confused: cheers, vertex_x
-
hi, following problem: i trace the actual front window with GetForegroundWindow(), then look up, if its classname is "CabinetWClass" or "ExploreWClass", witch are the explorer window-classes. ok, so far, so good. then i subclass the "SysListView32" if it exists by passing through the CWnd-childwindows with EnumChildWindows(..., ...) - fine, works! i subclass the resulting CListView of the explorer-window and subclass its CListCtrl - ok - i can get the index of the selected item with .GetSelectonMark(). all functions work like .GetSelectionCount() and so on... but the function .GetItemText(item, subitem) dosen´t work - also the .GetItem(&pItem) dosent return the filename of the selected file... so what??? anyone have an idea? what i try to do: i want to check out if specific files are selected in the windows-explorer-windows - if they are selected, i want to run a action... :confused: cheers, vertex_x
vertex_x wrote: what i try to do: i want to check out if specific files are selected in the windows-explorer-windows - if they are selected, i want to run a action... Why not just add your action item to the context menu that pops up when you right-click a file? It's much easier, and wouldn't be nearly as annoying, than what you are currently doing.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
-
vertex_x wrote: what i try to do: i want to check out if specific files are selected in the windows-explorer-windows - if they are selected, i want to run a action... Why not just add your action item to the context menu that pops up when you right-click a file? It's much easier, and wouldn't be nearly as annoying, than what you are currently doing.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
of course, thats right. but excessive right-clicking and popping windows takes to much time for me. i just want to cycle through a lot of files and directly see some type of preview... without draging files to a preview window or starting applikations via right-click...
-
of course, thats right. but excessive right-clicking and popping windows takes to much time for me. i just want to cycle through a lot of files and directly see some type of preview... without draging files to a preview window or starting applikations via right-click...
Fair enough. Have you checked out the
IShellChangeNotify
interface? There's alsoSHChangeNotifyRegister()
.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
-
Fair enough. Have you checked out the
IShellChangeNotify
interface? There's alsoSHChangeNotifyRegister()
.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
thanx alot! i actually can´t find any documentation about them, even not in my msdn-library ;o) looking now on msdn in the net for it ;o) i´ll notice here, if it works... cheers, vertex
-
Fair enough. Have you checked out the
IShellChangeNotify
interface? There's alsoSHChangeNotifyRegister()
.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
with the above functions i get only messages if something is changed - eg. file rw-access, folder creation/delet, media insertion/remov and so on... but thanks anyway ;o) it was a good tray :o) cheers, vertex