control

指定用户定义的类型是控件。

[control]

备注

控件 属性暗示 coclass 属性。 控件 C++ 特性具有与 控件 MIDL 属性相同。

示例

// cpp_attr_ref_control.cpp
// compile with: /LD
#include <windows.h>
[module(name="Test", control=true)];

[object, uuid("9e66a290-4365-11d2-a997-00c04fa37ddb")]
__interface ICustom {
   HRESULT Custom([in] long l, [out, retval] long *pLong);
};

[coclass, control, appobject, uuid("9e66a294-4365-11d2-a997-00c04fa37ddb")]
class CTest : public ICustom {};

要求

属性上下文

适用对象

, struct

可重复

必需的特性

无效的特性

有关属性上下文的更多信息,请参见 属性上下文

请参见

其他资源

IDL 特性

类特性

Typedef、Enum、Union 和 Struct 特性

Attributes Samples