Displaying Files By Using the Open With Command

A project can ask the IDE to display the Open With dialog box. This request prompts the user to open a file that has a selection of standard editors. The following steps describe this process.

  1. The project calls OpenStandardEditor, specifying a value of OSE_UseOpenWithDialog for the OSEOpenDocEditor parameter.

  2. Based on the document's file name extension, the IDE determines which editors listed in the Registry can open the specified document and displays this information in the Open With dialog box.

    备注

    Projects that have an intrinsic editor that must be included in the Open With dialog box must register an editor factory for each such editor. Intrinsic editors only function together with a particular type of project, which is enforced in the implementation of the CreateEditorInstance method. The IDE has a built-in editor factory for the core text editor and the binary editor. The IDE also creates an instance of an editor factory on behalf of each registered Windows file association. An example of such a file is Microsoft Word.

  3. As soon as the user selects an item from the Open With dialog box, the IDE then opens the document by calling OpenStandardEditor method. For more information, see How to: Open Standard Editors.

See Also

Tasks

How to: Open Standard Editors

Concepts

Displaying Files By Using the Open File Command

Other Resources

Opening and Saving Project Items