You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: docs/cpp/abort-function.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ ms.workload: ["cplusplus"]
18
18
---
19
19
# abort Function
20
20
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*.
Copy file name to clipboardExpand all lines: docs/cpp/additive-operators-plus-and.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ for( int i = 0; i < 10; ++i )
103
103
> 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`.
104
104
105
105
## 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>).
107
107
108
108
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.
Copy file name to clipboardExpand all lines: docs/cpp/bstr-t-class.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ ms.workload: ["cplusplus"]
54
54
**END Microsoft Specific**
55
55
56
56
## Requirements
57
-
**Header:** comutil.h
57
+
**Header:**\<comutil.h>
58
58
59
59
**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)
Copy file name to clipboardExpand all lines: docs/cpp/com-error-class.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ ms.workload: ["cplusplus"]
68
68
**END Microsoft Specific**
69
69
70
70
## Requirements
71
-
**Header:** comdef.h
71
+
**Header:**\<comdef.h>
72
72
73
73
`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)
**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)
Copy file name to clipboardExpand all lines: docs/cpp/com-raise-error.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ ms.workload: ["cplusplus"]
40
40
**IErrorInfo** object.
41
41
42
42
## 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.
44
44
45
45
You can also use [_set_com_error_handler](../cpp/set-com-error-handler.md) to replace the default error-handling function.
**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).
Copy file name to clipboardExpand all lines: docs/cpp/compiler-com-support-classes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ ms.workload: ["cplusplus"]
20
20
# Compiler COM Support Classes
21
21
**Microsoft Specific**
22
22
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.
Copy file name to clipboardExpand all lines: docs/cpp/convertbstrtostring.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ char * text: Test
67
67
**END Microsoft Specific**
68
68
69
69
## Requirements
70
-
**Header:** comutil.h.
70
+
**Header:**\<comutil.h>.
71
71
72
72
**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)
Copy file name to clipboardExpand all lines: docs/cpp/convertstringtobstr.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ BSTR text: Test
64
64
**END Microsoft Specific**
65
65
66
66
## Requirements
67
-
**Header:** comutil.h
67
+
**Header:**\<comutil.h>
68
68
69
69
**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)
Copy file name to clipboardExpand all lines: docs/cpp/event-handling-in-native-cpp.md
+21-13Lines changed: 21 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,28 +17,34 @@ manager: "ghogen"
17
17
ms.workload: ["cplusplus"]
18
18
---
19
19
# 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.
21
26
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.
27
30
28
31
## 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.
30
34
31
35
## 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.
33
38
34
39
### 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.
0 commit comments