Skip to content

Commit 667a90d

Browse files
authored
fixed up header name casing and added angle brackets (MicrosoftDocs#549)
* changed header names to lower case in cpp folder * added angle brackets to header names in cpp folder * Update event-handling-in-native-cpp.md fixed oops. * Update event-handling-in-native-cpp.md Fix a missing newline, put spaces around headings
1 parent d9f7733 commit 667a90d

31 files changed

Lines changed: 60 additions & 52 deletions

docs/cpp/abort-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.workload: ["cplusplus"]
1818
---
1919
# abort Function
2020

21-
The **abort** function, also declared in the standard include file STDLIB.H, terminates a C++ program. The difference between **exit** and **abort** is that **exit** allows the C++ run-time termination processing to take place (global object destructors will be called), whereas **abort** terminates the program immediately. For more information, see [abort](../c-runtime-library/reference/abort.md) in the *Run-Time Library Reference*.
21+
The **abort** function, also declared in the standard include file \<stdlib.h>, terminates a C++ program. The difference between **exit** and **abort** is that **exit** allows the C++ run-time termination processing to take place (global object destructors will be called), whereas **abort** terminates the program immediately. For more information, see [abort](../c-runtime-library/reference/abort.md) in the *Run-Time Library Reference*.
2222

2323
## See also
2424

docs/cpp/additive-operators-plus-and.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ for( int i = 0; i < 10; ++i )
103103
> Code of the form `pIntArray = pIntArray + 1` is rarely found in C++ programs; to perform an increment, these forms are preferable: `pIntArray++` or `pIntArray += 1`.
104104
105105
## Pointer subtraction
106-
If both operands are pointers, the result of subtraction is the difference (in array elements) between the operands. The subtraction expression yields a signed integral result of type ptrdiff_t (defined in the standard include file STDDEF.H).
106+
If both operands are pointers, the result of subtraction is the difference (in array elements) between the operands. The subtraction expression yields a signed integral result of type ptrdiff_t (defined in the standard include file \<stddef.h>).
107107

108108
One of the operands can be of integral type, as long as it is the second operand. The result of the subtraction is of the same type as the original pointer. The value of the subtraction is a pointer to the (*n* - *i*)th array element, where *n* is the element pointed to by the original pointer and *i* is the integral value of the second operand.
109109

docs/cpp/bstr-t-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ms.workload: ["cplusplus"]
5454
**END Microsoft Specific**
5555

5656
## Requirements
57-
**Header:** comutil.h
57+
**Header:** \<comutil.h>
5858

5959
**Lib:** comsuppw.lib or comsuppwd.lib (see [/Zc:wchar_t (wchar_t Is Native Type)](../build/reference/zc-wchar-t-wchar-t-is-native-type.md) for more information)
6060

docs/cpp/com-error-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ms.workload: ["cplusplus"]
6868
**END Microsoft Specific**
6969

7070
## Requirements
71-
**Header:** comdef.h
71+
**Header:** \<comdef.h>
7272

7373
`Lib:` comsuppw.lib or comsuppwd.lib (see [/Zc:wchar_t (wchar_t Is Native Type)](../build/reference/zc-wchar-t-wchar-t-is-native-type.md) for more information)
7474

docs/cpp/com-ptr-t-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ _COM_SMARTPTR_TYPEDEF(IMyInterface, __uuidof(IMyInterface));
6262
**END Microsoft Specific**
6363

6464
## Requirements
65-
**Header:** comip.h
65+
**Header:** \<comip.h>
6666

6767
**Lib:** comsuppw.lib or comsuppwd.lib (see [/Zc:wchar_t (wchar_t Is Native Type)](../build/reference/zc-wchar-t-wchar-t-is-native-type.md) for more information)
6868

docs/cpp/com-raise-error.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ms.workload: ["cplusplus"]
4040
**IErrorInfo** object.
4141

4242
## Remarks
43-
`_com_raise_error`, which is defined in comdef.h, can be replaced by a user-written version of the same name and prototype. This could be done if you want to use `#import` but do not want to use C++ exception handling. In that case, a user version of **_com_raise_error** might decide to do a `longjmp` or display a message box and halt. The user version should not return, though, because the compiler COM support code does not expect it to return.
43+
`_com_raise_error`, which is defined in \<comdef.h>, can be replaced by a user-written version of the same name and prototype. This could be done if you want to use `#import` but do not want to use C++ exception handling. In that case, a user version of **_com_raise_error** might decide to do a `longjmp` or display a message box and halt. The user version should not return, though, because the compiler COM support code does not expect it to return.
4444

4545
You can also use [_set_com_error_handler](../cpp/set-com-error-handler.md) to replace the default error-handling function.
4646

@@ -55,7 +55,7 @@ void __stdcall _com_raise_error(HRESULT hr, IErrorInfo* perrinfo) {
5555
**END Microsoft Specific**
5656

5757
## Requirements
58-
**Header:** comdef.h
58+
**Header:** \<comdef.h>
5959

6060
**Lib:** If the **wchar_t is Native Type** compiler option is on, use comsuppw.lib or comsuppwd.lib. If **wchar_t is Native Type** is off, use comsupp.lib. For more information, see [/Zc:wchar_t (wchar_t Is Native Type)](../build/reference/zc-wchar-t-wchar-t-is-native-type.md).
6161

docs/cpp/compiler-com-support-classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ms.workload: ["cplusplus"]
2020
# Compiler COM Support Classes
2121
**Microsoft Specific**
2222

23-
Standard classes are used to support some of the COM types. The classes are defined in comdef.h and the header files generated from the type library.
23+
Standard classes are used to support some of the COM types. The classes are defined in \<comdef.h> and the header files generated from the type library.
2424

2525
|Class|Purpose|
2626
|-----------|-------------|

docs/cpp/convertbstrtostring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ char * text: Test
6767
**END Microsoft Specific**
6868

6969
## Requirements
70-
**Header:** comutil.h.
70+
**Header:** \<comutil.h>.
7171

7272
**Lib:** comsuppw.lib or comsuppwd.lib (see [/Zc:wchar_t (wchar_t Is Native Type)](../build/reference/zc-wchar-t-wchar-t-is-native-type.md) for more information)
7373

docs/cpp/convertstringtobstr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ BSTR text: Test
6464
**END Microsoft Specific**
6565

6666
## Requirements
67-
**Header:** comutil.h
67+
**Header:** \<comutil.h>
6868

6969
**Lib:** comsuppw.lib or comsuppwd.lib (see [/Zc:wchar_t (wchar_t Is Native Type)](../build/reference/zc-wchar-t-wchar-t-is-native-type.md) for more information)
7070

docs/cpp/event-handling-in-native-cpp.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,34 @@ manager: "ghogen"
1717
ms.workload: ["cplusplus"]
1818
---
1919
# Event Handling in Native C++
20-
In native C++ event handling, you set up an event source and event receiver using the [event_source](../windows/event-source.md) and [event_receiver](../windows/event-receiver.md) attributes, respectively, specifying `type`=`native`. These attributes allow the classes to which they are applied to fire events and handle events in a native, non-COM context.
20+
21+
In native C++ event handling, you set up an event source and event receiver using the [event_source](../windows/event-source.md) and [event_receiver](../windows/event-receiver.md) attributes, respectively, specifying `type`=`native`. These attributes allow the classes to which they are applied to fire events and handle events in a native, non-COM context.
22+
23+
## Declaring Events
24+
25+
In an event source class, use the [__event](../cpp/event.md) keyword on a method declaration to declare the method as an event. Make sure to declare the method, but do not define it; to do so will generate a compiler error, because the compiler defines the method implicitly when it is made into an event. Native events can be methods with zero or more parameters. The return type can be void or any integral type.
2126

22-
## Declaring Events
23-
In an event source class, use the [__event](../cpp/event.md) keyword on a method declaration to declare the method as an event. Make sure to declare the method, but do not define it; to do so will generate a compiler error, because the compiler defines the method implicitly when it is made into an event. Native events can be methods with zero or more parameters. The return type can be void or any integral type.
24-
25-
## Defining Event Handlers
26-
In an event receiver class, you define event handlers, which are methods with signatures (return types, calling conventions, and arguments) that match the event that they will handle.
27+
## Defining Event Handlers
28+
29+
In an event receiver class, you define event handlers, which are methods with signatures (return types, calling conventions, and arguments) that match the event that they will handle.
2730

2831
## Hooking Event Handlers to Events
29-
Also in an event receiver class, you use the intrinsic function [__hook](../cpp/hook.md) to associate events with event handlers and [__unhook](../cpp/unhook.md) to dissociate events from event handlers. You can hook several events to an event handler, or several event handlers to an event.
32+
33+
Also in an event receiver class, you use the intrinsic function [__hook](../cpp/hook.md) to associate events with event handlers and [__unhook](../cpp/unhook.md) to dissociate events from event handlers. You can hook several events to an event handler, or several event handlers to an event.
3034

3135
## Firing Events
32-
To fire an event, simply call the method declared as an event in the event source class. If handlers have been hooked to the event, the handlers will be called.
36+
37+
To fire an event, simply call the method declared as an event in the event source class. If handlers have been hooked to the event, the handlers will be called.
3338

3439
### Native C++ Event Code
35-
The following example shows how to fire an event in native C++. To compile and run the example, refer to the comments in the code.
40+
41+
The following example shows how to fire an event in native C++. To compile and run the example, refer to the comments in the code.
3642

3743
## Example
3844

3945
### Code
4046

41-
```
47+
```cpp
4248
// evh_native.cpp
4349
#include <stdio.h>
4450

@@ -82,10 +88,12 @@ int main() {
8288
8389
### Output
8490
85-
```
91+
```Output
8692
MyHandler2 was called with value 123.
8793
MyHandler1 was called with value 123.
8894
```
8995

90-
## See Also
91-
[Event Handling](../cpp/event-handling.md)
96+
## See Also
97+
98+
[Event Handling](../cpp/event-handling.md)
99+

0 commit comments

Comments
 (0)