开发者

How can I get the right click event object file name?

开发者 https://www.devze.com 2023-01-15 00:36 出处:网络
I created a ATL/COM project, and implement the IShellExtInit interface. In the Initialize me开发者_运维知识库thod, I use the DrapDropFile function to get the file names of the files whose selected in

I created a ATL/COM project, and implement the IShellExtInit interface. In the Initialize me开发者_运维知识库thod, I use the DrapDropFile function to get the file names of the files whose selected in the folder.

e.g.

1.In the folder C:\WINDOWS\MyFolder\ contains the files:

a.png, b.bmp, c.jpg

2.Right click the "b.bmp".

3.In the Initialize method, I get a list of file names.

fileNames[0] = C:\WINDOWS\MyFolder\b.bmp

fileNames[1] = C:\WINDOWS\MyFolder\c.jpg

fileNames[2] = C:\WINDOWS\MyFolder\a.png

Question:

How can I get the actual sequence of the file.( a/b/c not b/c/a )

Expect:

1.Right click the "b.bmp".

I get the file name: C:\WINDOWS\MyFolder\a.png

2.Right click the "a.png".

I get the file name: C:\WINDOWS\MyFolder\a.png


The item that was clicked on is always first. The order of the remaining items is undefined and non-deterministic.

0

精彩评论

暂无评论...
验证码 换一张
取 消