Partager via


COleClientItem::ActivateAs

Uses OLE's object conversion facilities to activate the item as though it were an item of the type specified by clsidNew.

virtual BOOL ActivateAs( 
   LPCTSTR lpszUserType, 
   REFCLSID clsidOld, 
   REFCLSID clsidNew  
);

Parameters

  • lpszUserType
    Pointer to a string representing the target user type, such as "Word Document."

  • clsidOld
    A reference to the item's current class ID. The class ID should represent the type of the actual object, as stored, unless it is a link. In that case, it should be the CLSID of the item to which the link refers. The COleConvertDialog automatically provides the correct class ID for the item.

  • clsidNew
    A reference to the target class ID.

Return Value

Nonzero if successful; otherwise 0.

Remarks

This is called automatically by COleConvertDialog::DoConvert. It is not usually called directly.

Requirements

Header: afxole.h

See Also

Reference

COleClientItem Class

Hierarchy Chart

COleConvertDialog Class

COleClientItem::ConvertTo

COleClientItem::Reload