Get the field on which the explorer window is sorted

三世轮回 提交于 2019-12-02 22:27:50

问题


I would like to know if there is a way to know how the files in a Windows Explorer window are sorted. Kind of having the "ORDER BY" clause of the window. Example : "Name ascending" or "Date Modified Descending".

This question is NOT about windows' name-sorting algorithm, but about user-defined sort criteria of a specific open Windows Explorer window.

The goal is, when I double-click on an image in Windows Explorer, to start my program (no problem there), and to find which were the previous and next images (for my program's previous and next buttons), as it was in the explorer window.

Do you know if it's possible, and if so, how ?

That would be perfect if it were in C#, but even C++ would be great.


回答1:


I guess you could use the shell extension to persist the current sort order of all windows explorer sessions to disk when they changed, with timestamps. Then you read that data into your app when needed to decide how the UI is rendered.



来源:https://stackoverflow.com/questions/14401016/get-the-field-on-which-the-explorer-window-is-sorted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!