Поделиться через


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 
);

Параметры

  • 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.

Возвращаемое значение

Nonzero if successful; otherwise 0.

Заметки

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

Требования

Header: afxole.h

См. также

Основные понятия

COleClientItem Class

COleClientItem Members

Hierarchy Chart

COleConvertDialog Class

COleClientItem::ConvertTo

COleClientItem::Reload