Cool Mike
Cool Mike

Reputation: 65

what is the main difference between Common File Dialog and Common Item Dialog in c++?

My question is :

what is the main difference between Common File Dialog and Common Item Dialog ?

The MSDN just said that :

Starting with Windows Vista, the Common Item Dialog supersedes the older Common File Dialog when used to open or save a file.We recommend that you use the Common Item Dialog API instead of the Common File Dialog API.

but it has not explained that what is the change log or main difference between them ?

thank for any help.

Upvotes: 3

Views: 1151

Answers (1)

Serge Ballesta
Serge Ballesta

Reputation: 149165

Common File Dialog was just a custom DialogBog. On the other end, Common Item Dialog is a full COM server.

Microsoft's documentation says :

The Common Item Dialog implementation found in Windows Vista provides several advantages over the implementation provided in earlier versions:

  • Supports direct use of the Shell namespace through IShellItem instead of using file system paths.
  • Enables simple customization of the dialog, such as setting the label on the OK button, without requiring a hook procedure.
  • Supports more extensive customization of the dialog by the addition of a set of data-driven controls that operate without a Win32 dialog template. This customization scheme frees the calling process from UI layout. Since any changes to the dialog design continue to use this data model, the dialog implementation is not tied to the specific current version of the dialog.
  • Supports caller notification of events within the dialog, such as selection change or file type change. Also enables the calling process to hook certain events in the dialog, such as the parsing.
  • Introduces new dialog features such as adding caller-specified places to the Places bar.
  • In the Save dialog, developers can take advantage of new metadata features of the Windows Vista Shell.

Simply it is harder to use from a simple low-level Win32 program.

Upvotes: 5

Related Questions