Skip to content

Commit 803ec31

Browse files
authored
Merge pull request #1215 from msebolt/windows-formatting-review-pr31
windows formatting review pr31
2 parents 3d69807 + 5d2faf1 commit 803ec31

40 files changed

+68
-99
lines changed

docs/windows/ftmbase-unmarshalinterface-method.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Initializes a newly created proxy and returns an interface pointer to that proxy
1717

1818
## Syntax
1919

20-
```
20+
```cpp
2121
STDMETHODIMP UnmarshalInterface(
2222
__in IStream *pStm,
2323
__in REFIID riid,
2424
__deref_out void **ppv
2525
) override;
2626
```
2727

28-
#### Parameters
28+
### Parameters
2929
*pStm*
3030
Pointer to the stream from which the interface pointer is to be unmarshaled.
3131

docs/windows/generic-classes-cpp-cli.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A generic class is declared using the following form:
1616

1717
## Syntax
1818

19-
```
19+
```cpp
2020
[attributes]
2121
generic <class-key type-parameter-identifier(s)>
2222
[constraint-clauses]
@@ -30,7 +30,7 @@ class-body
3030
## Remarks
3131
In the above syntax, the following terms are used:
3232

33-
`attributes` (optional)
33+
*attributes* (optional)
3434
Additional declarative information. For more information on attributes and attribute classes, see Attributes.
3535

3636
*class-key*
@@ -414,7 +414,7 @@ ref struct Outer {
414414
};
415415
```
416416
417-
The type Outer\<int>::Inner is not the same as the type Outer\<double>::Inner.
417+
The type `Outer<int>::Inner` is not the same as the type `Outer<double>::Inner`.
418418
419419
As with generic methods in generic classes, additional type parameters can be defined for the nested type. If you use the same type parameter names in the inner and outer class, the inner type parameter will hide the outer type parameter.
420420
@@ -434,7 +434,7 @@ ref class Outer {
434434

435435
Since there is no way to refer to the outer type parameter, the compiler will produce a warning in this situation.
436436

437-
When constructed nested generic types are named, the type parameter for the outer type is not included in the type parameter list for the inner type, even though the inner type is implicitly parameterized by the outer type's type parameter. In the above case, a name of a constructed type would be Outer\<int>::Inner\<string>.
437+
When constructed nested generic types are named, the type parameter for the outer type is not included in the type parameter list for the inner type, even though the inner type is implicitly parameterized by the outer type's type parameter. In the above case, a name of a constructed type would be `Outer<int>::Inner<string>`.
438438

439439
The following example demonstrates building and reading a linked list using nested types in generic classes.
440440

@@ -533,7 +533,7 @@ Reading nodes:
533533

534534
- Properties, events, indexers and operators can use the type parameters of the enclosing generic class as return values, parameters, or local variables, such as when `ItemType` is a type parameter of a class:
535535

536-
```
536+
```cpp
537537
public ItemType MyProperty {}
538538
```
539539

docs/windows/generic-delegates-visual-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ You can use generic type parameters with delegates. For more information on dele
1616

1717
## Syntax
1818

19-
```
19+
```cpp
2020
[attributes]
2121
generic < [class | typename] type-parameter-identifiers>
2222
[type-parameter-constraints-clauses]
2323
[accessibility-modifiers] delegate result-type identifier
2424
([formal-parameters]);
2525
```
2626

27-
#### Parameters
27+
### Parameters
2828
*attributes* (Optional)
2929
Additional declarative information. For more information on attributes and attribute classes, see Attributes.
3030

docs/windows/generic-functions-cpp-cli.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ ms.workload: ["cplusplus", "uwp"]
1515
A generic function is a function that is declared with type parameters. When called, actual types are used instead of the type parameters.
1616

1717
## All Platforms
18-
**Remarks**
18+
### Remarks
1919

2020
This feature does not apply to all platforms.
2121

2222
## Windows Runtime
23-
**Remarks**
23+
### Remarks
2424

2525
This feature is not supported in the Windows Runtime.
2626

@@ -32,7 +32,7 @@ A generic function is a function that is declared with type parameters. When cal
3232

3333
### Syntax
3434

35-
```
35+
```cpp
3636
[attributes] [modifiers]
3737
return-type identifier<type-parameter identifier(s)>
3838
[type-parameter-constraints clauses]
@@ -79,7 +79,6 @@ return-type identifier<type-parameter identifier(s)>
7979
Compiler option: `/clr`
8080
8181
### Examples
82-
**Example**
8382
8483
The following code sample demonstrates a generic function.
8584
@@ -114,8 +113,6 @@ int main() {
114113
}
115114
```
116115

117-
**Example**
118-
119116
Generic functions can be overloaded based on signature or arity, the number of type parameters on a function. Also, generic functions can be overloaded with non-generic functions of the same name, as long as the functions differ in some type parameters. For example, the following functions can be overloaded:
120117

121118
```cpp
@@ -132,8 +129,6 @@ ref struct MyClass {
132129
};
133130
```
134131
135-
**Example**
136-
137132
The following example uses a generic function to find the first element in an array. It declares `MyClass`, which inherits from the base class `MyBaseClass`. `MyClass` contains a generic function, `MyFunction`, which calls another generic function, `MyBaseClassFunction`, within the base class. In `main`, the generic function, `MyFunction`, is called using different type arguments.
138133
139134
```cpp
@@ -170,8 +165,6 @@ int main() {
170165
}
171166
```
172167

173-
**Output**
174-
175168
```Output
176169
My function returned an int: 2003
177170
My function returned a string: Hello generic functions!

docs/windows/generic-interfaces-visual-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ The restrictions that apply to type parameters on classes are the same as those
2222

2323
## Syntax
2424

25-
```
25+
```cpp
2626
[attributes] generic <class-key type-parameter-identifier[, ...]>
2727
[type-parameter-constraints-clauses][accesibility-modifiers] interface class identifier [: base-list] { interface-body} [declarators] ;
2828
```
2929
3030
## Remarks
3131
*attributes* (optional)
32-
Additional declarative information. For more information on attributes and attribute classes, see Attributes.
32+
Additional declarative information. For more information on attributes and attribute classes, see **Attributes**.
3333
3434
*class-key*
3535
**class** or **typename**

docs/windows/generics-and-templates-visual-cpp.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Generics and templates are both language features that provide support for param
3939

4040
## Combining Templates and Generics
4141

42-
- The basic difference in generics has implications for building applications that combine templates and generics. For example, suppose you have a template class that you want to create a generic wrapper for to expose that template to other languages as a generic. You cannot have the generic take a type parameter that it then passes though to the template, since the template needs to have that type parameter at compile time, but the generic won't resolve the type parameter until runtime. Nesting a template inside a generic won't work either because there's no way to expand the templates at compile time for arbitrary generic types that could be instantiated at runtime.
42+
The basic difference in generics has implications for building applications that combine templates and generics. For example, suppose you have a template class that you want to create a generic wrapper for to expose that template to other languages as a generic. You cannot have the generic take a type parameter that it then passes though to the template, since the template needs to have that type parameter at compile time, but the generic won't resolve the type parameter until runtime. Nesting a template inside a generic won't work either because there's no way to expand the templates at compile time for arbitrary generic types that could be instantiated at runtime.
4343

4444
## Example
4545

@@ -83,8 +83,6 @@ int main() {
8383
}
8484
```
8585
86-
### Output
87-
8886
```Output
8987
F
9088
```

docs/windows/generics-cpp-component-extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.workload: ["cplusplus", "uwp"]
1616
Generics are parameterized types and methods. In this section, find out which generic features are supported by both the Windows Runtime and the common language runtime, and which are supported by only the common language runtime. Also, find out how to author your own generic methods and types in Visual C++, and how to use generic types authored in a .NET Framework language in Visual C++. Finally, this section provides a comparison of generics and C++ templates.
1717

1818
## In This Section
19-
**Supported by the Windows Runtime and the Common Language Runtime**
19+
### Supported by the Windows Runtime and the Common Language Runtime
2020

2121
[Overview of Generics in Visual C++](../windows/overview-of-generics-in-visual-cpp.md)
2222
Information about generics are, the motivation for the language feature, definitions of terms used to describe generics, and information about the use of reference types and value types as type parameters for generics.
@@ -36,7 +36,7 @@ Generics are parameterized types and methods. In this section, find out which ge
3636
[Generics and Templates (Visual C++)](../windows/generics-and-templates-visual-cpp.md)
3737
A comparison of generics and templates, when to use each, and how to combine them usefully.
3838

39-
**Supported by the Common Language Runtime**
39+
### Supported by the Common Language Runtime
4040

4141
[Generic Functions (C++/CLI)](../windows/generic-functions-cpp-cli.md)
4242
Information about defining and using generic functions and methods.

docs/windows/getactivationfactory-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Retrieves an activation factory for the type specified by the template parameter
1717

1818
## Syntax
1919

20-
```
20+
```cpp
2121
template<typename T>
2222
inline HRESULT GetActivationFactory(
2323
_In_ HSTRING activatableClassId,

docs/windows/grid-settings-dialog-box-image-editor-for-icons.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,4 @@ Allows you to specify the grid settings for your image and displays grid lines o
3232

3333
## See Also
3434
[Resizing an Image](../windows/resizing-an-image-image-editor-for-icons.md)
35-
[Image Editor for Icons](../windows/image-editor-for-icons.md)
36-
35+
[Image Editor for Icons](../windows/image-editor-for-icons.md)

docs/windows/grouping-radio-buttons-on-a-dialog-box.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.author: "mblome"
1313
ms.workload: ["cplusplus", "uwp"]
1414
---
1515
# Grouping Radio Buttons on a Dialog Box
16-
When you add radio buttons to a dialog box, treat them as a group by setting a Group property in the Properties window for the first button in the group. A control ID for that radio button then appears in the [Add Member Variable Wizard](../ide/add-member-variable-wizard.md), allowing you to add a member variable for the group of radio buttons.
16+
When you add radio buttons to a dialog box, treat them as a group by setting a **Group** property in the **Properties** window for the first button in the group. A control ID for that radio button then appears in the [Add Member Variable Wizard](../ide/add-member-variable-wizard.md), allowing you to add a member variable for the group of radio buttons.
1717

1818
You can have more than one group of radio buttons on a dialog box, and each group should be added using the following procedure.
1919

@@ -28,7 +28,7 @@ When you add radio buttons to a dialog box, treat them as a group by setting a G
2828
Changing the **Group** property to **True** adds the WS_GROUP style to the button's entry in the dialog object of the resource script and ensures that a user can only select one radio button at a time in the button group (when the user clicks one radio button, the others in the group are cleared).
2929

3030
> [!NOTE]
31-
> Only the first radio button in the group should have the **Group** property set to **True**. If you have additional controls that are not part of the button group, set the **Group** property of the first control *that is outside the group* to **True** as well. You can quickly identify the first control outside of the group by pressing CTRL+D to view the tab order.
31+
> Only the first radio button in the group should have the **Group** property set to **True**. If you have additional controls that are not part of the button group, set the **Group** property of the first control *that is outside the group* to **True** as well. You can quickly identify the first control outside of the group by pressing **Ctrl**+**D** to view the tab order.
3232
3333
### To add a member variable for the radio button group
3434

@@ -40,14 +40,13 @@ When you add radio buttons to a dialog box, treat them as a group by setting a G
4040

4141
4. In the **Variable name** box, type a name for the new member variable.
4242

43-
5. In the **Variable type** list box, select **int** or type **int**.
43+
5. In the **Variable type** list box, select **int** or type `int`.
4444

45-
6. You can now modify your code to specify which radio button should appear selected. For example, m_radioBox1 = 0; selects the first radio button in the group.
45+
6. You can now modify your code to specify which radio button should appear selected. For example, `m_radioBox1 = 0;` selects the first radio button in the group.
4646

4747
For information on adding resources to managed projects, please see [Resources in Desktop Apps](/dotnet/framework/resources/index) in the *.NET Framework Developer's Guide*. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resource strings to properties, see [Creating Resource Files for Desktop Apps](/dotnet/framework/resources/creating-resource-files-for-desktop-apps). For information on globalization and localization of resources in managed apps, see [Globalizing and Localizing .NET Framework Applications](/dotnet/standard/globalization-localization/index).
4848

4949
## Requirements
50-
5150
Win32
5251

5352
## See Also

0 commit comments

Comments
 (0)