简体   繁体   English

文件操作进度对话框

[英]File operation progress dialog

Windows provides standard component - progress dialog. Windows提供了标准组件-进度对话框。 It was invented in Windows XP. 它是在Windows XP中发明的。 Progress dialog can be created via CoCreateInstance call with interface IProgressDialog. 可以使用接口IProgressDialog通过CoCreateInstance调用来创建进度对话框。 Windows Vista provides another (new) UI for progress dialog. Windows Vista为进度对话框提供了另一个(新)UI。 One need to create progress dialog with interface IOperationsProgressDialog to get new UI. 需要使用接口IOperationsProgressDialog创建进度对话框以获取新的UI。 There is the one component (CLSID_ProgressDialog): it supports both interfaces and UIs. 有一个组件(CLSID_ProgressDialog):它支持接口和UI。 IOperationsProgressDialog interface is recommended to use. 推荐使用IOperationsProgressDialog接口。

I've developed namespace extension. 我已经开发了名称空间扩展。 it supports drag & drop. 它支持拖放。 I use scenario to transfer data from my NSE: 我使用方案从NSE传输数据:

  • IShellFolder::GetUIObjectOf -> IDataObject IShellFolder :: GetUIObjectOf-> IDataObject
  • IDataObject::GetData -> FILEDESCRIPTOR, FILECONTENTS IDataObject :: GetData-> FILEDESCRIPTOR,FILECONTENTS
  • FILECONTENTS -> IStream 文件内容-> IStream
  • IStream::Read -> data to transfer IStream :: Read->要传输的数据

FILEDESCRIPTOR reports that my NSE requires progress UI (FD_PROGRESSUI). FILEDESCRIPTOR报告我的NSE需要进度UI(FD_PROGRESSUI)。 Progress dialog is shown while files are copied. 复制文件时显示进度对话框。 This progress dialog has UI which is provided by IProgressDialog interface. 此进度对话框具有由IProgressDialog界面提供的UI。 I need explorer to use progress dialog with IOperationsProgressDialog's UI but I don't know how to force explorer do it. 我需要资源管理器以将进度对话框与IOperationsProgressDialog的UI配合使用,但我不知道如何强制资源管理器执行此操作。 I provide IDataObject and IStream only. 我仅提供IDataObject和IStream。 NSE is designed for Windows 7 but progress dialog has old UI. NSE是为Windows 7设计的,但是进度对话框具有旧的UI。 How can I get new progress dialog UI during copying from my NSE to explorer? 从NSE复制到资源管理器期间,如何获得新的进度对话框UI?

您可以QueryInterface所提供的对象是否也实现IOperationsProgressDialog ,但是您应该准备处理E_NOINTERFACE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM