开发者

TOpenDialog - zip as files

开发者 https://www.devze.com 2023-03-14 10:11 出处:网络
How it is possible in open&save dialogs to force z开发者_运维百科ip archives to be displayed as files, not as folders?

How it is possible in open&save dialogs to force z开发者_运维百科ip archives to be displayed as files, not as folders?

By displayed as folders I mean like this:

TOpenDialog - zip as files


The Windows file open dialog on Vista and higher supports an IFileDialogEvents interface.

One of the events (or callback if you will) is the OnFolderChanging event. It allows the implementer to stop navigation to a particular location. Using this event would enable you to stop entering a zip file as a folder, even when that capability is enabled by default in the Windows installation running your app. Don't see how it would enable navigation into a zip though if that is not enabled in Windows itself.

See: IFileDialogEvents Interface ( http://msdn.microsoft.com/en-us/library/bb775876(v=VS.85).aspx ) for details.

The AlphaControls probably use this method. To do it yourself, you would "only" have to implement a handler for the TOpenDialog.OnFolderChange event (Thanks David).

To read more about using the Common Item Dialog, please see: http://msdn.microsoft.com/en-us/library/bb776913(v=VS.85).aspx

Note: Pre-Vista common dialogs also support events, known as notifications in these versions. It does include a FolderChange notification, but no FolderChanging one that I can find. See Common Dialog Box Notifications ( http://msdn.microsoft.com/en-us/library/ff468811(v=VS.85).aspx for a list of supported notifications. And Dialog Boxes ( http://msdn.microsoft.com/en-us/library/ms632588(v=VS.85).aspx ) for the "entry" point to dialog boxes.

0

精彩评论

暂无评论...
验证码 换一张
取 消