다음을 통해 공유


COleClientItem::GetUserType

Call this function to get the user-visible string describing the OLE item's type, such as "Word document."

void GetUserType(
   USERCLASSTYPE nUserClassType,
   CString& rString 
);

Parameters

  • nUserClassType
    A value indicating the desired variant of the string describing the OLE item's type. This can have one of the following values:

    • USERCLASSTYPE_FULL   The full type name displayed to the user.

    • USERCLASSTYPE_SHORT   A short name (15 characters maximum) for use in pop-up menus and the Edit Links dialog box.

    • USERCLASSTYPE_APPNAME   Name of the application servicing the class.

  • rString
    A reference to a CString object to which the string describing the OLE item's type is to be returned.

Remarks

This is often the entry in the system registration database.

If the full type name is requested but not available, the short name is used instead. If no entry for the type of OLE item is found in the registration database, or if there are no user types registered for the type of OLE item, then the user type currently stored in the OLE item is used. If that user type name is an empty string, "Unknown Object" is used.

For more information, see IOleObject::GetUserType in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleClientItem Class

Hierarchy Chart

COleClientItem::GetType

Other Resources

COleClientItem Members