Api file open dialog


















String getDirectory. String getFileName. String getPath. String getDefaultDirectory. String dir. String getLastDirectory. String getLastName. Releases all resources used by the Component. Releases the unmanaged resources used by the Component and optionally releases the managed resources.

Retrieves the current lifetime service object that controls the lifetime policy for this instance. Returns an object that represents a service provided by the Component or by its Container. Gets the Type of the current instance. Defines the common dialog box hook procedure that is overridden to add specific functionality to the file dialog box. Creates a shallow copy of the current Object. Creates a shallow copy of the current MarshalByRefObject object.

Raises the FileOk event. Raises the HelpRequest event. Opens the file selected by the user, with read-only permission. The file is specified by the FileName property. Defines the owner window procedure that is overridden to add specific functionality to a common dialog box.

Occurs when the component is disposed by a call to the Dispose method. Occurs when the user clicks on the Open or Save button on a file dialog box. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Please rate your experience Yes No. Any additional feedback? Namespace: System. Forms Assembly: System. In this article. Inherited from FileDialog. To make room for these new controls, the system adds space to the left, right, bottom, and top of the default dialog box as needed.

The system requires the hook procedure to process all messages intended for the custom dialog box and therefore sends the same window messages to the hook procedure as to any other dialog box procedure.

The hook procedure is responsible for initializing these controls and retrieving values from the controls when the dialog box is closed. The default dialog box procedure handles messages for all the controls in the default dialog box, but the hook procedure receives the notification messages for user actions on these controls as described in Explorer-Style Hook Procedures.

The Windows Software Development Kit SDK provides the default dialog box template for the old-style dialog boxes, but does not include the default template for the Explorer-style dialog boxes. This is because the Explorer-style dialog boxes allow you to add your own controls but do not support modifying the template for the standard controls. However, in some cases, you may need to know the control identifiers used in the default templates.

The following table shows the identifiers of the standard controls in the Explorer-style Open and Save As dialog boxes. The identifiers are constants defined in Dlgs. You can customize an old-style Open or Save As dialog box by providing an OFNHookProcOldStyle hook procedure that receives messages or notifications intended for the default dialog box procedure. You can also provide a custom template to use in place of the default template.

The hook procedures and templates used with the old-style dialog boxes are similar to those used with the other common dialog boxes. Create the custom template by modifying the default template specified in the Fileopen.

The control identifiers used in the default Find and Replace dialog templates are defined in the Dlgs. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful?

Please rate your experience Yes No. Any additional feedback? In this article. This format enables the Explorer-style dialog boxes to return long file names that include spaces.

The directory and file name strings are separated by spaces. For file names with spaces, the function uses short file names. The hook procedure receives notification messages sent from the common dialog box and messages for any additional controls that you defined by specifying a child dialog template. The hook procedure does not receive messages for the standard controls of the default dialog box.

The system uses the custom template to create a child dialog box. The template can define additional controls, and can specify the location of the cluster of standard controls. The custom template does not replace the default template. The hook procedure receives all messages sent to the dialog box, including messages for the standard controls and any custom controls. The hook procedure also receives registered messages sent from the common dialog box. Sets the default file name extension for an Explorer-style Open or Save As dialog box.

Sent by an Explorer-style Open or Save As dialog box when a new folder is opened. Sent by an Open or Save As dialog box to determine whether the dialog box should display an item in a shell folder's item list.

Sent by an Explorer-style Open or Save As dialog box when the system has finished arranging the controls in the dialog box. The system moves the standard controls to make room for the controls of the child dialog box. Sent by an Explorer-style Open or Save As dialog box when the selection changes in the list box that displays the contents of the currently opened folder or directory. Sent by an Explorer-style Open or Save As dialog box when the user clicks the OK button and a network sharing violation occurs for the selected file.

Sent by an Explorer-style Open or Save As dialog box when the user selects a new file type from the file types combo box. The hook procedure can accept the color and allow the dialog box to close, or reject the color and force the dialog box to remain open.

The hook procedure can accept the file name and allow the dialog box to close, or reject the file name and force the dialog box to remain open. Notifies the hook procedure of a Page Setup dialog box, PagePaintHook , that the dialog box is about to draw the envelope-stamp rectangle of the sample page. Notifies a PagePaintHook hook procedure of the coordinates of the sample page rectangle in the Page Setup dialog box. The dialog box sends this message when it is about to draw the contents of the sample page.

Notifies the hook procedure of a Page Setup dialog box, PagePaintHook , that the dialog box is about to draw Greek text inside the margin rectangle of the sample page.

Notifies the hook procedure of a Page Setup dialog box, PagePaintHook , that the dialog box is about to draw the margin rectangle of the sample page. Notifies a PagePaintHook hook procedure of the coordinates of the margin rectangle in the sample page. A Page Setup dialog box sends this message when it is about to draw the contents of the sample page. Notifies a PagePaintHook hook procedure that the Page Setup dialog box is about to draw the contents of the sample page. The hook procedure can use this message to carry out initialization tasks related to drawing the contents of the sample page.

Notifies the hook procedure of a Page Setup dialog box, PagePaintHook , that the dialog box is about to draw the return address portion of an envelope sample page. Contains information the ChooseColor function uses to initialize the Color dialog box. After the user closes the dialog box, the system returns information about the user's selection in this structure.



0コメント

  • 1000 / 1000