如何在鼠标单击文件时获取选择文件名称 [英] How Can I Get The Select Files Name When Mouse Click Files

查看:320
本文介绍了如何在鼠标单击文件时获取选择文件名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨:

我想在Windows 7中点击文件和路径时获取文件名,如果选择多个文件获取所有路径和名称。但我不知道该怎么办。我研究了这个问题几天,但没有找到解决方案。谁能帮助我。

我在我的程序中使用了c + +语言。

谢谢!

Hi:
I want to get the files name when mouse click files and path in windows 7,If select multiple files get all path and name.But i don't know what should i do. I researched the problem for a few days and didn't find a solution.who can help me.
I used the c + + language in my program.
Thanks!

推荐答案

为了处理这个复杂的问题,最好使用MFC CFileDialog类。也许你只需要覆盖CFileDialog :: OnItemSelected()函数。



但我的经验是,它很棘手,你最好留在微软代码附近。



另请参阅有关 codeguru 的讨论。
For dealing with that complicated issue it is better to work with the MFC CFileDialog class. Maybe you only need to overwrite the CFileDialog::OnItemSelected() function.

But my experience was, that it is tricky and you better stay near the Microsoft code.

Take also a look at this discussion on codeguru.


这篇关于如何在鼠标单击文件时获取选择文件名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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