|
发表于 2021-7-13 16:41:17
|
显示全部楼层
河北省邢台市
- nFileExtension
- Type: WORD
- The zero-based offset, in characters, from the beginning of the path to the file name extension in the string pointed to by lpstrFile. For the ANSI version, this is the number of bytes; for the Unicode version, this is the number of characters. Usually the file name extension is the substring which follows the last occurrence of the dot (".") character. For example, txt is the extension of the filename readme.txt, html the extension of readme.txt.html. Therefore, if lpstrFile points to the string "c:\dir1\dir2\readme.txt", this member contains the value 20. If lpstrFile points to the string "c:\dir1\dir2\readme.txt.html", this member contains the value 24. If lpstrFile points to the string "c:\dir1\dir2\readme.txt.html.", this member contains the value 29. If lpstrFile points to a string that does not contain any "." character such as "c:\dir1\dir2\readme", this member contains zero.
复制代码
https://docs.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-openfilenamea
MSDN官方文档解释,这个是指向lpstrFile参数是偏移量!所以是短整数很正常.... |
|