Class Attributes

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

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

AttributeDescription
aggregatableIndicates that the class supports aggregation.
aggregatesIndicates that a control aggregates the target class.
appobjectIdentifies 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.
caseUsed with the switch_type attribute in a union.
coclassCreates an ActiveX control.
com_interface_entryAdds an interface entry to a COM map.
controlSpecifies that the user-defined type is a control.
customLets you define your own attribute.
db_commandCreates an OLE DB command.
db_paramAssociates the specified member variable with an input or output parameter and delimits the variable.
db_sourceCreates a connection to a data source.
db_tableOpens an OLE DB table.
defaultIndicates that the custom or dispinterface defined within a coclass represents the default programmability interface.
defaultvtableDefines an interface as the default vtable interface for a control.
event_receiverCreates an event receiver.
event_sourceCreates an event source.
helpcontextSpecifies a context ID that lets the user view information about this element in the Help file.
helpfileSets the name of the Help file for a type library.
helpstringcontextSpecifies the ID of a help topic in an .hlp or .chm file.
helpstringSpecifies a character string that is used to describe the element to which it applies.
hiddenIndicates that the item exists but should not be displayed in a user-oriented browser.
implementsSpecifies dispatch interfaces that are forced to be members of the IDL coclass.
implements_categorySpecifies implemented component categories for the class.
moduleDefines the library block in the .idl file.
noncreatableDefines an object that cannot be instantiated by itself.
progidDefines the ProgID for a control.
registration_scriptExecutes the specified registration script.
requesteditIndicates that the property supports the OnRequestEdit notification.
sourceSpecifies 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_infoSupports error reporting for the target object.
threadingSpecifies the threading model for a control.
uuidSpecifies the unique ID for a class or interface.
versionIdentifies a particular version among multiple versions of a class.
vi_progidSpecifies a version-independent form of the ProgID.

Attributes by Usage

Show: