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


Class Attributes

The following attributes apply to the class C++ keyword.

Attribute

Description

aggregatable

Indicates that the class supports aggregation.

aggregates

Indicates that a control aggregates the target class.

appobject

Identifies the coclass as an application object, which is associated with a full .exe application, and indicates that the functions and properties of the coclass are globally available in this type library.

case

Used with the switch_type attribute in a union.

coclass

Creates an ActiveX control.

com_interface_entry

Adds an interface entry to a COM map.

control

Specifies that the user-defined type is a control.

custom

Lets you define your own attribute.

db_command

Creates an OLE DB command.

db_param

Associates the specified member variable with an input or output parameter and delimits the variable.

db_source

Creates a connection to a data source.

db_table

Opens an OLE DB table.

default

Indicates that the custom or dispinterface defined within a coclass represents the default programmability interface.

defaultvtable

Defines an interface as the default vtable interface for a control.

event_receiver

Creates an event receiver.

event_source

Creates an event source.

helpcontext

Specifies a context ID that lets the user view information about this element in the Help file.

helpfile

Sets the name of the Help file for a type library.

helpstringcontext

Specifies the ID of a help topic in an .hlp or .chm file.

helpstring

Specifies a character string that is used to describe the element to which it applies.

hidden

Indicates that the item exists but should not be displayed in a user-oriented browser.

implements

Specifies dispatch interfaces that are forced to be members of the IDL coclass.

implements_category

Specifies implemented component categories for the class.

module

Defines the library block in the .idl file.

noncreatable

Defines an object that cannot be instantiated by itself.

perf_object

Adds performance monitor object support to a class.

perfmon

Adds performance monitor support to a class.

progid

Defines the ProgID for a control.

registration_script

Executes the specified registration script.

requestedit

Indicates that the property supports the OnRequestEdit notification.

source

Specifies the control's source interfaces for connection points on a class. On a property or method, the source attribute indicates that the member returns an object or VARIANT that is a source of events.

support_error_info

Supports error reporting for the target object.

threading

Specifies the threading model for a control.

uuid

Specifies the unique ID for a class or interface.

version

Identifies a particular version among multiple versions of a class.

vi_progid

Specifies a version-independent form of the ProgID.

См. также

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

Attributes by Usage