如何打开包含所需文本文件的特定目录? [英] How Can I Open A Specific Directory That Contains The Desired Text File?

查看:77
本文介绍了如何打开包含所需文本文件的特定目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在本地磁盘C中打开一个包含文本文件的文件夹。该文件不应该首先打开,但只应打开包含该文件的文件夹。但是当文件夹打开时,选择必须出现在特定的文本文件中。



有人有解决方案吗?

I want to open a folder in Local Disk C that contains a text file. That file should not Open first but only the folder containing the file should open. But when the Folder opens, selection must comes at the specific text file.

Does Anybody have a solution for this?

推荐答案

你可以使用CFileDialog 类。如果你正确地将它初始化,则打开文件夹并选择所需的文件。



对于Vista或更新版本,请查看 Common Item Dialog
You can use the CFileDialog class for that. If you innitialize it properly the folder is opened and the desired file is selected.

For Vista or newer take a look on Common Item Dialog.


这篇关于如何打开包含所需文本文件的特定目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆