Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.36 KB

control.md

File metadata and controls

55 lines (41 loc) · 1.36 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: control
control (C++ COM Attribute)
10/02/2018
vc-attr.control
Control attribute
3d046bb2-4afe-4cb8-a762-233b296e1975

control

Specifies that the user-defined type is a control.

Syntax

[control]

Remarks

The control attribute implies the coclass attribute. The control C++ attribute has the same functionality as the control MIDL attribute.

Example

// 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 {};

Requirements

Attribute context Value
Applies to class, struct
Repeatable No
Required attributes None
Invalid attributes None

For more information about the attribute contexts, see Attribute Contexts.

See also

IDL Attributes
Class Attributes
Typedef, Enum, Union, and Struct Attributes