如何从DialogBoxIndirectParam()获取完整的文件路径 [英] How to get complete file path from DialogBoxIndirectParam()
问题描述
我想知道是否使用API DialogBoxIndirectParam()创建了一些对话框,当用户从本地文件系统中选择该对话框中的某个文件时,那么有没有办法获得完整的文件名?
我已经枚举了该对话框中的所有子窗口以及使用GetDlgItemText()的Combobox窗口我可以获取所选文件的名称(名称没有扩展名),但我没有得到文件名的路径和扩展名。所以,如果有人知道如何获得
完整文件路径,请帮助我。
谢谢,
Bishnu
感谢您发布此处。
路径 :: < a href ="https://msdn.microsoft.com/en-us/library/system.io.path.getfilename(v=vs.110).aspx"> GetFileName
方法可以帮助你。
Hi,
I want to know if some dialog box is created using API DialogBoxIndirectParam(), and when user select some file in that dialog from the local file system, then Is there a way to get the complete file name ?
I have enumerated all child windows in that dialog box and for Combobox window using GetDlgItemText () I can get the name of selected file (name without extension), but I don't get the path and extension of the file name. So If someone knows how to get the complete file path then please help me.
Thanks,
BishnuThanks for posting here.
Path::GetFileName Method can help you.
这篇关于如何从DialogBoxIndirectParam()获取完整的文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!