共用方式為


COlePropertiesDialog Class

Encapsulates the Windows common OLE Object Properties dialog box.

class COlePropertiesDialog : public COleDialog

Members

Public Constructors

Name

Description

COlePropertiesDialog::COlePropertiesDialog

Constructs a COlePropertiesDialog object.

Public Methods

Name

Description

COlePropertiesDialog::DoModal

Displays the dialog box and allows the user to make a selection.

COlePropertiesDialog::OnApplyScale

Called by the framework when the scaling of the document item has changed.

Public Data Members

Name

Description

COlePropertiesDialog::m_gp

A structure used to initialize the "General" page of a COlePropertiesDialog object.

COlePropertiesDialog::m_lp

A structure used to initialize the "Link" page of a COlePropertiesDialog object.

COlePropertiesDialog::m_op

A structure used to initialize the COlePropertiesDialog object.

COlePropertiesDialog::m_psh

A structure used to add additional custom property pages.

COlePropertiesDialog::m_vp

A structure used to customize the "View" page of a COlePropertiesDialog object.

Remarks

Common OLE Object Properties dialog boxes provide an easy way to display and modify the properties of an OLE document item in a manner consistent with Windows standards. These properties include, among others, information on the file represented by the document item, options for displaying the icon and image scaling, and information on the item's link (if the item is linked).

To use a COlePropertiesDialog object, first create the object using the COlePropertiesDialog constructor. After the dialog box has been constructed, call the DoModal member function to display the dialog box and allow the user to modify any properties of the item. DoModal returns whether the user selected the OK (IDOK) or the Cancel (IDCANCEL) button. In addition to the OK and Cancel buttons, there is an Apply button. When the user selects Apply, any changes made to the properties of the document item are applied to the item and its image is automatically updated, but remains active.

The m_psh data member is a pointer to a PROPSHEETHEADER structure, and in most cases you will not need to access it explicitly. One exception is when you need additional property pages beyond the default General, View, and Link pages. In this case, you can modify the m_psh data member to include your custom pages before calling the DoModal member function.

For more information on OLE dialog boxes, see the article Dialog Boxes in OLE.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CDialog

CCommonDialog

COleDialog

COlePropertiesDialog

Requirements

Header: afxodlgs.h

See Also

Reference

COleDialog Class

Hierarchy Chart

COleDialog Class

CPropertyPage Class

Concepts

MFC Sample CIRC