How to get list of selected files when using GetOpenFileName() with multiselect flag?

后端 未结 5 921
予麋鹿
予麋鹿 2021-01-15 19:20

I have tried googling, but people seem to have the same problem: we can\'t get a list of the selected files.

This is a simple piece of working code that is similar t

5条回答
  •  感动是毒
    2021-01-15 19:51

    Checking nFileExtension may NOT be reliable because it can also be 0 if the user entered no file extension (but just the dot, like "file."). I think to distinguish between single and multi file selection one has to check if there is a null character (terminator) at position nFileOffset - 1.

提交回复
热议问题