Skip to content

Commit 506abd2

Browse files
author
mtx48109
committed
windows formatting review pr5
1 parent 33871b0 commit 506abd2

30 files changed

Lines changed: 245 additions & 254 deletions

docs/windows/comptrref-operator-void-star-star-operator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ operator void**() const;
2222
```
2323

2424
## Remarks
25-
Deletes the current ComPtrRef object, casts the pointer to the interface that was represented by the ComPtrRef object as a pointer-to-pointer-to `void`, and then returns the cast pointer.
25+
Deletes the current **ComPtrRef** object, casts the pointer to the interface that was represented by the **ComPtrRef** object as a pointer-to-pointer-to **void**, and then returns the cast pointer.
2626

2727
## Requirements
2828
**Header:** client.h
@@ -31,4 +31,4 @@ operator void**() const;
3131

3232
## See Also
3333
[ComPtrRef Class](../windows/comptrref-class.md)
34-
[Microsoft::WRL::Details Namespace](../windows/microsoft-wrl-details-namespace.md)
34+
[Microsoft::WRL::Details Namespace](../windows/microsoft-wrl-details-namespace.md)

docs/windows/comptrref-releaseandgetaddressof-method.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ InterfaceType** ReleaseAndGetAddressOf();
2222
```
2323

2424
## Return Value
25-
Pointer to the interface that was represented by the deleted ComPtrRef object.
25+
Pointer to the interface that was represented by the deleted **ComPtrRef** object.
2626

2727
## Remarks
28-
Deletes the current ComPtrRef object and returns a pointer-to-a-pointer to the interface that was represented by the ComPtrRef object.
28+
Deletes the current **ComPtrRef** object and returns a pointer-to-a-pointer to the interface that was represented by the **ComPtrRef** object.
2929

3030
## Requirements
3131
**Header:** client.h

docs/windows/comptrrefbase-class.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class ComPtrRefBase;
2525
```
2626

2727
#### Parameters
28-
`T`
29-
A [ComPtr\<T>](../windows/comptr-class.md) type or a type derived from it, not merely the interface represented by the ComPtr.
28+
*T*
29+
A [ComPtr\<T>](../windows/comptr-class.md) type or a type derived from it, not merely the interface represented by the **ComPtr**.
3030

3131
## Remarks
3232
Represents the base class for the [ComPtrRef](../windows/comptrref-class.md) class.
@@ -37,7 +37,7 @@ class ComPtrRefBase;
3737

3838
|Name|Description|
3939
|----------|-----------------|
40-
|`InterfaceType`|A synonym for the type of template parameter `T`.|
40+
|`InterfaceType`|A synonym for the type of template parameter *T*.|
4141

4242
### Public Operators
4343

docs/windows/comptrrefbase-operator-iinspectable-star-star-operator.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ operator IInspectable**() const;
2424

2525
## Remarks
2626

27-
Casts the current [ptr_](../windows/comptrrefbase-ptr-data-member.md) data member to a pointer-to-a-pointer-to the IInspectable interface.
27+
Casts the current [ptr_](../windows/comptrrefbase-ptr-data-member.md) data member to a pointer-to-a-pointer-to the `IInspectable` interface.
2828

29-
An error is emitted if the current ComPtrRefBase doesn't derive from IInspectable.
29+
An error is emitted if the current **ComPtrRefBase** doesn't derive from `IInspectable`.
3030

3131
This cast is available only if **&#95;&#95;WRL_CLASSIC_COM&#95;&#95;** is defined.
3232

@@ -37,6 +37,5 @@ This cast is available only if **&#95;&#95;WRL_CLASSIC_COM&#95;&#95;** is define
3737
**Namespace:** Microsoft::WRL::Details
3838

3939
## See Also
40-
4140
[ComPtrRefBase Class](../windows/comptrrefbase-class.md)
42-
[Microsoft::WRL::Details Namespace](../windows/microsoft-wrl-details-namespace.md)
41+
[Microsoft::WRL::Details Namespace](../windows/microsoft-wrl-details-namespace.md)

docs/windows/comptrrefbase-operator-iunknown-star-star-operator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ operator IUnknown**() const;
2222
```
2323

2424
## Remarks
25-
Casts the current [ptr_](../windows/comptrrefbase-ptr-data-member.md) data member to a pointer-to-a-pointer-to the IUnknown interface.
25+
Casts the current [ptr_](../windows/comptrrefbase-ptr-data-member.md) data member to a pointer-to-a-pointer-to the `IUnknown` interface.
2626

27-
An error is emitted if the current ComPtrRefBase doesn't derive from IUnknown.
27+
An error is emitted if the current **ComPtrRefBase** doesn't derive from `IUnknown`.
2828

2929
## Requirements
3030
**Header:** client.h

docs/windows/constraints-on-generic-type-parameters-cpp-cli.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ In generic type or method declarations, you can qualify a type parameter with co
2020
## Syntax
2121

2222
```
23-
2423
where type-parameter: constraint list
2524
```
2625

@@ -33,7 +32,7 @@ where type-parameter: constraint list
3332

3433
The list can also include a class. For the type argument to satisfy a base class constraint, it must be the same class as the constraint or derive from the constraint.
3534

36-
You can also specify `gcnew()` to indicate the type argument must have a public parameterless constructor; or `ref class` to indicate the type argument must be a reference type, including any class, interface, delegate, or array type; or `value class` to indicate the type argument must be a value type. Any value type except Nullable\<T> can be specified.
35+
You can also specify `gcnew()` to indicate the type argument must have a public parameterless constructor; or **ref class** to indicate the type argument must be a reference type, including any class, interface, delegate, or array type; or **value class** to indicate the type argument must be a value type. Any value type except Nullable\<T> can be specified.
3736

3837
You can also specify a generic parameter as a constraint. The type argument supplied for the type you are constraining must be or derive from the type of the constraint. This is called a naked type constraint.
3938

@@ -44,9 +43,9 @@ where type-parameter: constraint list
4443

4544
Class and interface constraints specify that the argument types must be or inherit from a specified class or implement a specified interface.
4645

47-
The application of constraints to a generic type or method allows code in that type or method to take advantage of the known features of the constrained types. For example, you can declare a generic class such that the type parameter implements the **IComparable\<T>** interface:
46+
The application of constraints to a generic type or method allows code in that type or method to take advantage of the known features of the constrained types. For example, you can declare a generic class such that the type parameter implements the `IComparable<T>` interface:
4847

49-
```
48+
```cpp
5049
// generics_constraints_1.cpp
5150
// compile with: /c /clr
5251
using namespace System;
@@ -55,17 +54,17 @@ where T : IComparable<T>
5554
ref class List {};
5655
```
5756
58-
This constraint requires that a type argument used for `T` implements `IComparable<T>` at compile time. It also allows interface methods, such as **CompareTo**, to be called. No cast is needed on an instance of the type parameter to call interface methods.
57+
This constraint requires that a type argument used for `T` implements `IComparable<T>` at compile time. It also allows interface methods, such as `CompareTo`, to be called. No cast is needed on an instance of the type parameter to call interface methods.
5958
6059
Static methods in the type argument's class cannot be called through the type parameter; they can be called only through the actual named type.
6160
62-
A constraint cannot be a value type, including built-in types such as `int` or **double**. Since value types cannot have derived classes, only one class would ever be able to satisfy the constraint. In that case, the generic can be rewritten with the type parameter replaced by the specific value type.
61+
A constraint cannot be a value type, including built-in types such as **int** or **double**. Since value types cannot have derived classes, only one class would ever be able to satisfy the constraint. In that case, the generic can be rewritten with the type parameter replaced by the specific value type.
6362
6463
Constraints are required in some cases since the compiler will not allow the use of methods or other features of an unknown type unless the constraints imply that the unknown type supports the methods or interfaces.
6564
6665
Multiple constraints for the same type parameter can be specified in a comma-separated list
6766
68-
```
67+
```cpp
6968
// generics_constraints_2.cpp
7069
// compile with: /c /clr
7170
using namespace System;
@@ -77,7 +76,7 @@ ref class List {};
7776

7877
With multiple type parameters, use one **where** clause for each type parameter. For example:
7978

80-
```
79+
```cpp
8180
// generics_constraints_3.cpp
8281
// compile with: /c /clr
8382
using namespace System;
@@ -97,7 +96,7 @@ ref class Dictionary {};
9796
9897
- Constraints cannot themselves be type parameters, but they can involve the type parameters in an open constructed type. For example:
9998
100-
```
99+
```cpp
101100
// generics_constraints_4.cpp
102101
// compile with: /c /clr
103102
generic <typename T>
@@ -111,7 +110,7 @@ ref class Dictionary {};
111110
## Example
112111
The following example demonstrates using constraints to call instance methods on type parameters.
113112
114-
```
113+
```cpp
115114
// generics_constraints_5.cpp
116115
// compile with: /clr
117116
using namespace System;
@@ -172,11 +171,11 @@ int main() {
172171
## Example
173172
When a generic type parameter is used as a constraint, it is called a naked type constraint. Naked type constraints are useful when a member function with its own type parameter needs to constrain that parameter to the type parameter of the containing type.
174173

175-
In the following example, T is a naked type constraint in the context of the Add method.
174+
In the following example, `T` is a naked type constraint in the context of the `Add` method.
176175

177176
Naked type constraints can also be used in generic class definitions. The usefulness of naked type constraints with generic classes is limited because the compiler can assume nothing about a naked type constraint except that it derives from <xref:System.Object>. Use naked type constraints on generic classes in scenarios in which you wish to enforce an inheritance relationship between two type parameters.
178177

179-
```
178+
```cpp
180179
// generics_constraints_6.cpp
181180
// compile with: /clr /c
182181
generic <class T>

docs/windows/consuming-generics-cpp-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Generics authored in one .NET language may be used in other .NET languages. Unli
2121

2222
### Code
2323

24-
```
24+
```cs
2525
// consuming_generics_from_other_NET_languages.cs
2626
// compile with: /target:library
2727
// a C# program
@@ -84,7 +84,7 @@ public class CircularList<ItemType> {
8484

8585
### Code
8686

87-
```
87+
```cpp
8888
// consuming_generics_from_other_NET_languages_2.cpp
8989
// compile with: /clr
9090
#using <consuming_generics_from_other_NET_languages.dll>

docs/windows/context-sensitive-keywords-cpp-component-extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ ms.workload: ["cplusplus", "uwp"]
6565
### Examples
6666
**Example**
6767

68-
The following code example shows that in the appropriate context, the `property` context-sensitive keyword can be used to define a property and a variable.
68+
The following code example shows that in the appropriate context, the **property** context-sensitive keyword can be used to define a property and a variable.
6969

70-
```
70+
```cpp
7171
// context_sensitive_keywords.cpp
7272
// compile with: /clr
7373
public ref class C {

docs/windows/control.md

Lines changed: 60 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,60 @@
1-
---
2-
title: "control | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "11/04/2016"
5-
ms.technology: ["cpp-windows"]
6-
ms.topic: "reference"
7-
f1_keywords: ["vc-attr.control"]
8-
dev_langs: ["C++"]
9-
helpviewer_keywords: ["Control attribute"]
10-
ms.assetid: 3d046bb2-4afe-4cb8-a762-233b296e1975
11-
author: "mikeblome"
12-
ms.author: "mblome"
13-
ms.workload: ["cplusplus", "uwp"]
14-
---
15-
# control
16-
Specifies that the user-defined type is a control.
17-
18-
## Syntax
19-
20-
```
21-
22-
[control]
23-
24-
```
25-
26-
## Remarks
27-
The **control** attribute implies the [coclass](../windows/coclass.md) attribute. The **control** C++ attribute has the same functionality as the [control](http://msdn.microsoft.com/library/windows/desktop/aa366764) MIDL attribute.
28-
29-
## Example
30-
31-
```
32-
// cpp_attr_ref_control.cpp
33-
// compile with: /LD
34-
#include <windows.h>
35-
[module(name="Test", control=true)];
36-
37-
[object, uuid("9e66a290-4365-11d2-a997-00c04fa37ddb")]
38-
__interface ICustom {
39-
HRESULT Custom([in] long l, [out, retval] long *pLong);
40-
};
41-
42-
[coclass, control, appobject, uuid("9e66a294-4365-11d2-a997-00c04fa37ddb")]
43-
class CTest : public ICustom {};
44-
```
45-
46-
## Requirements
47-
48-
### Attribute Context
49-
50-
|||
51-
|-|-|
52-
|**Applies to**|**class**, `struct`|
53-
|**Repeatable**|No|
54-
|**Required attributes**|None|
55-
|**Invalid attributes**|None|
56-
57-
For more information about the attribute contexts, see [Attribute Contexts](../windows/attribute-contexts.md).
58-
59-
## See Also
60-
[IDL Attributes](../windows/idl-attributes.md)
61-
[Class Attributes](../windows/class-attributes.md)
62-
[Typedef, Enum, Union, and Struct Attributes](../windows/typedef-enum-union-and-struct-attributes.md)
1+
---
2+
title: "control | Microsoft Docs"
3+
ms.custom: ""
4+
ms.date: "11/04/2016"
5+
ms.technology: ["cpp-windows"]
6+
ms.topic: "reference"
7+
f1_keywords: ["vc-attr.control"]
8+
dev_langs: ["C++"]
9+
helpviewer_keywords: ["Control attribute"]
10+
ms.assetid: 3d046bb2-4afe-4cb8-a762-233b296e1975
11+
author: "mikeblome"
12+
ms.author: "mblome"
13+
ms.workload: ["cplusplus", "uwp"]
14+
---
15+
# control
16+
Specifies that the user-defined type is a control.
17+
18+
## Syntax
19+
20+
```
21+
[control]
22+
```
23+
24+
## Remarks
25+
The **control** attribute implies the [coclass](../windows/coclass.md) attribute. The **control** C++ attribute has the same functionality as the [control](http://msdn.microsoft.com/library/windows/desktop/aa366764) MIDL attribute.
26+
27+
## Example
28+
29+
```cpp
30+
// cpp_attr_ref_control.cpp
31+
// compile with: /LD
32+
#include <windows.h>
33+
[module(name="Test", control=true)];
34+
35+
[object, uuid("9e66a290-4365-11d2-a997-00c04fa37ddb")]
36+
__interface ICustom {
37+
HRESULT Custom([in] long l, [out, retval] long *pLong);
38+
};
39+
40+
[coclass, control, appobject, uuid("9e66a294-4365-11d2-a997-00c04fa37ddb")]
41+
class CTest : public ICustom {};
42+
```
43+
44+
## Requirements
45+
46+
### Attribute Context
47+
48+
|||
49+
|-|-|
50+
|**Applies to**|**class**, **struct**|
51+
|**Repeatable**|No|
52+
|**Required attributes**|None|
53+
|**Invalid attributes**|None|
54+
55+
For more information about the attribute contexts, see [Attribute Contexts](../windows/attribute-contexts.md).
56+
57+
## See Also
58+
[IDL Attributes](../windows/idl-attributes.md)
59+
[Class Attributes](../windows/class-attributes.md)
60+
[Typedef, Enum, Union, and Struct Attributes](../windows/typedef-enum-union-and-struct-attributes.md)

docs/windows/cpp-attributes-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Microsoft defines a set of attributes that simplify COM programming and .NET Fra
3333
[Attributed Programming](../windows/attributed-programming-concepts.md)
3434
Provides a conceptual overview of attributes.
3535

36-
[Reference](http://msdn.microsoft.com/en-us/1ba03b5c-8229-4f63-b08c-6c12141d6ab1)
36+
[Reference](http://msdn.microsoft.com/1ba03b5c-8229-4f63-b08c-6c12141d6ab1)
3737
Provides links to topics describing the C and C++ language references, the libraries provided with Visual C++, the Visual C++ Extensibility Object Model, and the Microsoft Macro Assembler (MASM).
3838

3939
[Visual C++ Samples](../visual-cpp-samples.md)

0 commit comments

Comments
 (0)