Skip to content

Commit cb60690

Browse files
author
Colin Robertson
authored
Merge pull request #3835 from MicrosoftDocs/FromPrivateLiveToMaster
Resolve syncing conflicts from FromPrivateLiveToMaster to main
2 parents 820f1b3 + 6322c48 commit cb60690

File tree

5 files changed

+61
-17
lines changed

5 files changed

+61
-17
lines changed

docs/ide/adding-a-method-visual-cpp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,6 @@ Add a method to an interface by using the add method wizard:
5757

5858
## See also
5959

60+
[Add an IDL method wizard](add-interface-definition-library-method-wizard.md)\
61+
[Add an IDL MFC method wizard](../mfc/reference/add-idl-mfc-method-wizard.md)\
6062
[Adding functionality with code wizards](adding-functionality-with-code-wizards-cpp.md)

docs/intrinsics/vmx-on.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: __vmx_on"
33
title: "__vmx_on"
4-
ms.date: 04/14/2022"
4+
ms.date: 04/14/2022
55
f1_keywords: ["__vmx_on"]
66
helpviewer_keywords: ["VMXON instruction", "__vmx_on intrinsic"]
77
ms.assetid: 16804991-6a75-4adf-8ec2-bc95acfa4801

docs/mfc/reference/add-idl-mfc-method-wizard.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,5 @@ The following section describes the Add IDL MFC Method wizard UI:
140140
## See also
141141

142142
[Add method wizard](../../ide/adding-a-method-visual-cpp.md)\
143-
[MFC wizards and dialog boxes](mfc-wizards-and-dialog-boxes.md)
143+
[Add an IDL method wizard](../../ide/add-interface-definition-library-method-wizard.md)\
144+
[MFC wizards and dialog boxes](mfc-wizards-and-dialog-boxes.md)
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
---
2-
description: "Learn more about: Adding an MFC Class from a Type Library"
3-
title: "Adding an MFC Class from a Type Library"
4-
ms.date: "03/21/2022"
2+
description: "Learn more about: Adding an MFC class from a type library using a Microsoft Visual Studio wizard"
3+
title: "Add an MFC class from a type Library"
4+
ms.date: 04/14/2022
55
helpviewer_keywords: ["classes [MFC], adding MFC", "MFC, adding classes from type libraries", "type libraries, adding MFC classes from"]
6-
ms.assetid: aba40476-3cfb-47af-990e-ae2e9e0d79cf
76
ms.custom: devdivchpfy22
87
---
9-
# Adding an MFC Class from a Type Library
8+
# Add an MFC class from a type library
109

11-
Use this wizard to create an MFC class from an interface in an available type library. You can add an MFC class to an [MFC application](../../mfc/reference/creating-an-mfc-application.md), an [MFC DLL](../../mfc/reference/creating-an-mfc-dll-project.md), or an [MFC ActiveX control](../../mfc/reference/creating-an-mfc-activex-control.md).
10+
Use this wizard to create an MFC class from an interface in a type library. You can add an MFC class to an [MFC application](../../mfc/reference/creating-an-mfc-application.md), an [MFC DLL](../../mfc/reference/creating-an-mfc-dll-project.md), or an [MFC ActiveX control](../../mfc/reference/creating-an-mfc-activex-control.md).
1211

1312
> [!NOTE]
1413
> You don't need to create your MFC project with Automation enabled to add a class from a type library.
1514
16-
A type library contains a binary description of the interfaces exposed by a component, defining the methods along with their parameters and return types. Your type library must be registered for it to appear in the **Available type libraries** list in the Add Class from Typelib Wizard.
15+
A type library contains a binary description of the interfaces exposed by a component, defining the methods along with their parameters and return types. Your type library must be registered for it to appear in the **Available type libraries** list in the wizard.
1716

18-
### To add an MFC class from a type library
17+
## Add an MFC class from a type library
1918

2019
1. In either **Solution Explorer** or [Class View](/visualstudio/ide/viewing-the-structure-of-code), right-click the name of the project to which you want to add the class.
2120

22-
1. From the shortcut menu, select **Add**, and then select **New Item**.
21+
1. From the shortcut menu, select **Add** > **New Item**.
2322

2423
1. In the **Add New Item** dialog, select **Installed** packages and then select **Visual C++**.
2524

2625
1. In the Templates pane, select **MFC Class from Typelib**, and then select **Add** to display the [Add Class from Typelib Wizard](../../mfc/reference/add-class-from-typelib-wizard.md).
2726

28-
In the wizard, you can add more than one class in a type library. Likewise, you can add classes from more than one type library in a single wizard session.
27+
Using the wizard, you can add more than one class in a type library. You can add classes from more than one type library in a single wizard session.
2928

30-
The wizard creates an MFC class, derived from [COleDispatchDriver](../../mfc/reference/coledispatchdriver-class.md), for each interface you add from the selected type library. `COleDispatchDriver` implements the client side of OLE automation.
29+
The wizard creates an MFC class derived from [`COleDispatchDriver`](../../mfc/reference/coledispatchdriver-class.md), for each interface you add from the selected type library. `COleDispatchDriver` implements the client side of OLE automation.
3130

3231
## See also
3332

34-
[Automation Clients](../../mfc/automation-clients.md)<br/>
33+
[Automation Clients](../../mfc/automation-clients.md)\
3534
[Automation Clients: Using Type Libraries](../../mfc/automation-clients-using-type-libraries.md)

docs/standard-library/steady-clock-struct.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: steady_clock struct"
33
title: "steady_clock struct"
4-
ms.date: 08/19/2021
4+
ms.date: 04/14/2022
55
f1_keywords: ["chrono/std::chrono::steady_clock"]
66
---
77
# `steady_clock` struct
@@ -16,12 +16,54 @@ struct steady_clock;
1616

1717
## Remarks
1818

19-
A `steady_clock` is a monotonic clock, which means that time only moves forward. A `steady_clock` ensures that the time between clicks doesn't vary, making it better for measuring intervals than using a system clock that provides wall-clock time. The problem with using wall-clock time to measure elapsed time is that the wall-clock time may get modified while measuring an interval. It could be modified by synchronizing with another clock over the network, adjusting the time for daylight savings time, and so on. A `steady_clock` isn't subject to these adjustments, making it the preferred way to keep track of elapsed time.
19+
A `steady_clock` is a monotonic clock, which means that the time it reports only moves forward. The value returned by a call to `now` is always less than or equal to the value that is returned by the next call to `now`.
2020

21-
The value that is returned by a first call to `now` is always less than or equal to the value that is returned by the next call to `now`.
21+
A `steady_clock` ensures that the time between ticks is constant, making it better for measuring intervals than using a system clock. The system clock provides wall-clock time. The problem with using wall-clock time to measure elapsed time is that wall-clock time may get modified while measuring a time interval. It could be modified by synchronizing with another clock over the network, by a transition to daylight savings time, and so on. A `steady_clock` isn't subject to these adjustments, making it the preferred way to keep track of elapsed time.
2222

2323
`high_resolution_clock` is a typedef for `steady_clock`. On Windows, `steady_clock` wraps the `QueryPerformanceCounter` function.
2424

25+
## Example
26+
27+
```cpp
28+
#include <chrono>
29+
#include <thread>
30+
#include <iostream>
31+
32+
using namespace std::chrono;
33+
34+
int main()
35+
{
36+
auto begin = steady_clock::now();
37+
std::this_thread::sleep_for(std::chrono::seconds(1));
38+
auto end = steady_clock::now();
39+
40+
std::cout << "Elapsed seconds: "
41+
<< duration_cast<seconds>(end - begin).count()
42+
<< "s\n";
43+
44+
std::cout << "Elapsed milliseconds: "
45+
<< duration_cast<milliseconds>(end - begin).count()
46+
<< "ms\n";
47+
48+
std::cout << "Elapsed microseconds: "
49+
<< duration_cast<microseconds>(end - begin).count()
50+
<< "us\n";
51+
52+
std::cout << "Elapsed nanoseconds: "
53+
<< duration_cast<nanoseconds>(end - begin).count()
54+
<< " ns\n";
55+
56+
return 0;
57+
}
58+
```
59+
60+
```Output
61+
Elapsed seconds: 1s
62+
Elapsed milliseconds: 1007ms
63+
Elapsed microseconds: 1007266us
64+
Elapsed nanoseconds: 1007266700 ns
65+
```
66+
2567
### Convenience type aliases
2668

2769
|Name|Description|

0 commit comments

Comments
 (0)