This documentation is archived and is not being maintained.

COlePropertiesDialog Class

Encapsulates the Windows common OLE Object Properties dialog box.

class COlePropertiesDialog : public COleDialog




Constructs a COlePropertiesDialog object.




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


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




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


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


A structure used to initialize the COlePropertiesDialog object.


A structure used to add additional custom property pages.


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

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.

Header: afxodlgs.h