MFC:地址栏控件,如Windows资源管理器 [英] MFC: Address Bar control like Windows Explorer

查看:209
本文介绍了MFC:地址栏控件,如Windows资源管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的MFC应用程序中,我试图创建一个类似于Windows 7打开文件"对话框的窗口,但是它浏览了虚拟/伪造的文件系统.它不需要是完美的像素,但是我想尽可能与本机OS对话框保持一致.

In my MFC app, I'm attempting to make a window that resembles the Windows 7 Open File dialog, but it browses a virtual/fake file system. It doesn't need to be pixel-perfect, but I'd like parity with the native OS dialog where possible.

可能最具挑战性的部分是地址栏,该地址栏位于打开"对话框顶部.地址栏控件也位于所有Windows资源管理器窗口的顶部.它显示了组成您的路径的文件夹名称.当鼠标悬停在鼠标上时,它显示和隐藏按钮(包括有吸引力的淡入淡出动画),在单击名称时更改活动目录,在单击名称之间的三角形时显示子菜单.这似乎不对应于任何MFC控件(或控件组). Spy ++将其显示为"AddressDisplay控件",但除此之外我找不到更多文档.

Probably the most challenging part is the address bar the runs along the top of an Open dialog. The address bar control is also atop all Windows Explorer windows. It shows the folder names that make up your path. It shows and hides buttons when moused over (including an attractive fade animation), changes the active directory when names are clicked, and shows submenus when the triangles between names are clicked. This doesn't seem to correspond to any MFC control (or group of controls). Spy++ shows it as an "AddressDisplay Control" but I can't find much documentation beyond that.

在MFC中是否可以访问这样的控件或模仿它?另外,我不是在浏览 real 文件系统,所以我必须能够告诉控件要显示的内容-我不能只将其指向C:\并让系统执行休息.

Is there a way to access a control like this, or to mimic it, in MFC? Also, I am not browsing the real file system, so I have to be able to tell the control what to display--I can't just point it at C:\ and let the system do the rest.

这是有关控件的图片.

推荐答案

不幸的是,我认为这是Microsoft决定不通过Feature Pack向开发人员公开的控件之一.该功能包是从 BCG控件库开发的.并且,该库包含所需的控件.但是,它不是免费的.唯一的其他选择是自己编写代码.

Unfortunately, I think this is one of those controls that Microsoft has decided not to expose to developers through the Feature Pack. The Feature Pack was developed from the BCG control library. And, that library contains the control you want. However, it's not free. The only other alternative is to code it yourself.

这篇关于MFC:地址栏控件,如Windows资源管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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