Skip to content

Commit 75b7f6a

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#2472 from MicrosoftDocs/master637358745946170297
Repo sync for protected CLA branch
2 parents f770378 + c1fd917 commit 75b7f6a

119 files changed

Lines changed: 182 additions & 430 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/atl-mfc-shared/reference/cimage-class.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ To determine if an attached bitmap is a DIB section, call [IsDibSection](#isdibs
104104
105105
`CImage` cannot be selected into a new [CDC](../../mfc/reference/cdc-class.md). `CImage` creates its own HDC for the image. Because an HBITMAP can only be selected into one HDC at a time, the HBITMAP associated with the `CImage` cannot be selected into another HDC. If you need a CDC, retrieve the HDC from the `CImage` and give it to [CDC::FromHandle](../../mfc/reference/cdc-class.md#fromhandle).
106106

107-
## Example
107+
## Examples
108108

109109
```cpp
110110
// Get a CDC for the image
@@ -117,8 +117,6 @@ m_myImage.ReleaseDC();
117117
118118
When you use `CImage` in an MFC project, note which member functions in your project expect a pointer to a [CBitmap](../../mfc/reference/cbitmap-class.md) object. If you want to use `CImage` with such a function, like [CMenu::AppendMenu](../../mfc/reference/cmenu-class.md#appendmenu), use [CBitmap::FromHandle](../../mfc/reference/cbitmap-class.md#fromhandle), pass it your `CImage` HBITMAP, and use the returned `CBitmap*`.
119119
120-
## Example
121-
122120
```cpp
123121
void CMyDlg::OnRButtonDown(UINT nFlags, CPoint point)
124122
{

docs/build-insights/tutorials/wpa-basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ Most C++ Build Insights WPA views have multiple presets for you to choose from.
3636

3737
Some build traces are so large it's hard to make out the details. To zoom in on an area that interests you, right-click on the graph and select **Zoom**. You can always go back to the previous setting by choosing **Undo Zoom**. This image shows an example of using a selection and the **Zoom** command to zoom in on a section of the graph:
3838

39-
![Zooming in on a graph.](media/wpa-zooming.gif)
39+
![Short video showing zooming in on a graph.](media/wpa-zooming.gif)
4040

4141
## Group by different columns
4242

4343
You can customize the way your trace is displayed. Click on the gear icon at the top of a view pane and rearrange the columns in the Build Explorer View Editor. The columns found above the yellow line in this dialog are the ones your data rows are grouped by. The column right above the yellow line is special: in the graph view, it's displayed on the colored bars.
4444

4545
This image shows an example bar graph of a link invocation. We use the gear icon to open the Build Explorer View Editor dialog. Then we drag the Component and Name column entries above the yellow line. The configuration is changed to increase the level of detail, and to see what actually happened inside the linker:
4646

47-
![Zooming in on a graph.](media/wpa-grouping.gif)
47+
![Short video showing showing how you can group by different columns.](media/wpa-grouping.gif)
4848

4949
## See also
5050

docs/build/clang-support-cmake.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To modify an existing configuration to use Clang, follow these steps:
5050

5151
1. Under **General** select the **Toolset** dropdown and choose the desired Clang toolset:
5252

53-
![CMake Clang toolset](media/cmake-clang-toolset.png)
53+
![Screenshot of the General dialog box showing that the Toolset is selected and clang cl x 86 is highlighted.](media/cmake-clang-toolset.png)
5454

5555
## Custom Clang locations
5656

@@ -61,7 +61,7 @@ By default, Visual Studio looks for Clang in two places:
6161

6262
You can specify another location by setting the **CMAKE_C_COMPILER** and **CMAKE_CXX_COMPILER** CMake variables in **CMake Settings**:
6363

64-
![CMake Clang toolset](media/clang-location-cmake.png)
64+
![Screenshot of the C Make Settings dialog box with the C Make C X X Compiler highlighted.](media/clang-location-cmake.png)
6565

6666
## Clang compatibility modes
6767

docs/build/clang-support-msbuild.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ You can use Visual Studio 2019 version 16.2 with Clang to edit, build, and debug
2020

2121
For best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. If you prefer to use an existing Clang installation on your machine, choose the **C++ Clang-cl for v142 build tools.** optional component. The Microsoft C++ Standard Library currently requires at least Clang 8.0.0; the bundled version of Clang will automatically be updated to stay current with updates in the Microsoft implementation of the Standard Library.
2222

23-
![Clang component installation](media/clang-install-vs2019.png)
23+
![Screenshot of the Visual Studio installer with the Individual components tab selected and the C plus plus Clang components visible.](media/clang-install-vs2019.png)
2424

2525
## Configure a Windows project to use Clang tools
2626

2727
To configure a Visual Studio project to use Clang, right-click on the project node in **Solution Explorer** and choose **Properties**. Typically, you should first choose **All configurations** at the top of the dialog. Then, under **General** > **Platform Toolset**, choose **LLVM (clang-cl)** and then **OK**.
2828

29-
![Clang component installation](media/clang-msbuild-prop-page.png)
29+
![Screenshot of the Property Pages dialog box with Configuration Properties > General selected and the Platform Toolset and L L V M (clang c l) options highlighted.](media/clang-msbuild-prop-page.png)
3030

3131
If you are using the Clang tools that are bundled with Visual Studio, no additional steps are required. For Windows projects, Visual Studio by default invokes Clang in [clang-cl](https://llvm.org/devmtg/2014-04/PDFs/Talks/clang-cl.pdf) mode and links with the Microsoft implementation of the Standard Library. By default, **clang-cl.exe** is located in *%VCINSTALLDIR%\\Tools\\Llvm\\bin\\* and *%VCINSTALLDIR%\\Tools\\Llvm\\x64\\bin\\*.
3232

@@ -43,7 +43,7 @@ To configure a Visual Studio Linux project to use Clang:
4343
1. Under **General** > **Platform Toolset**, choose **WSL_Clang_1_0** if you are using Windows Subsystem for Linux, or **Remote_Clang_1_0** if you are using a remote machine or VM.
4444
1. Press **OK**.
4545

46-
![Clang component installation](media/clang-msbuild-prop-page.png)
46+
![Screenshot of the Console App clang Visual Studio 2019 Property Pages dialog box with Configuration Properties > General selected and the Platform Toolset and L L V M (clang c l) options highlighted.](media/clang-msbuild-prop-page.png)
4747

4848
On Linux, Visual Studio by default uses the first Clang location that it encounters in the PATH environment property. If you are using a custom Clang installation, then you must change the value of the `LLVMInstallDir` property or else substitute a path under **Project** > **Properties** > **VC++ DIrectories** > **Configuration Properties** > **Executable Directories**. See [Set a custom LLVM location](#custom_llvm_location) for more information.
4949

docs/build/cmake-projects-in-visual-studio.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The **C++ CMake tools for Windows** component uses the [Open Folder](open-folder
2020

2121
**C++ CMake tools for Windows** is installed as part of the **Desktop development with C++** and **Linux Development with C++** workloads. For more information, see [Cross-platform CMake projects](../linux/cmake-linux-project.md).
2222

23-
![CMake component in C++ Desktop workload](media/cmake-install-2019.png)
23+
![Screenshot of the Desktop development with C plus plus dropdown selected and the C plus plus C Make tools for Windows option called out.](media/cmake-install-2019.png)
2424

2525
For more information, see [Install the C++ Linux workload in Visual Studio](../linux/download-install-and-setup-the-linux-development-workload.md).
2626

@@ -153,7 +153,7 @@ Visual Studio 2017 has rich support for CMake, including [cross-platform CMake p
153153

154154
**Visual C++ Tools for CMake** is installed as part of the **Desktop development with C++** and **Linux Development with C++** workloads.
155155

156-
![CMake component in C++ Desktop workload](media/cmake-install.png)
156+
![Screenshot of the Individual components tab with the Visual C plus plus tools for C make option called out.](media/cmake-install.png)
157157

158158
For more information, see [Install the C++ Linux workload in Visual Studio](../linux/download-install-and-setup-the-linux-development-workload.md).
159159

docs/build/reference/clrsupportlasterror-preserve-last-error-code-for-pinvoke-calls.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ You can minimize the performance impact by linking with **/CLRSUPPORTLASTERROR:S
4040

4141
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalOptions%2A>.
4242

43-
## Example
43+
## Examples
4444

4545
The following sample defines a native DLL with one exported function that modifies last error.
4646

@@ -57,8 +57,6 @@ __declspec(dllexport) double MySqrt(__int64 n) {
5757
}
5858
```
5959
60-
## Example
61-
6260
The following sample consumes the DLL, demonstrating how to use **/CLRSUPPORTLASTERROR**.
6361
6462
```cpp

docs/build/reference/fe-name-exe-file.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,14 @@ If you specify the [/c (Compile Without Linking)](c-compile-without-linking.md)
3939

4040
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.OutputFile%2A>.
4141

42-
## Example
42+
## Examples
4343

4444
The following command line compiles and links all C source files in the current directory. The resulting executable file is named PROCESS.exe and is created in the directory "C:\Users\User Name\repos\My Project\bin".
4545

4646
```
4747
CL /Fe"C:\Users\User Name\repos\My Project\bin\PROCESS" *.C
4848
```
4949

50-
## Example
51-
5250
The following command line creates an executable file in `C:\BIN` with the same base name as the first source file in the current directory:
5351

5452
```

docs/build/vscpp-step-1-create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Visual Studio uses *projects* to organize the code for an app, and *solutions* t
2626

2727
1. In the **Configure your new project** dialog, enter *HelloWorld* in the **Project name** edit box. Choose **Create** to create the project.
2828

29-
![Name and create the new project](media/vs2019-configure-new-project-hello-world.png "Name and create the new project")
29+
![Screenshot of the Configure your new project dialog box with Hello World typed in the Project name text field.](media/vs2019-configure-new-project-hello-world.png "Name and create the new project")
3030

3131
Visual Studio creates a new project. It's ready for you to add and edit your source code. By default, the Console App template fills in your source code with a "Hello World" app:
3232

@@ -46,7 +46,7 @@ Visual Studio uses *projects* to organize the code for an app, and *solutions* t
4646

4747
1. In the **New Project** dialog, select **Installed > Visual C++** if it isn't selected already, and then choose the **Empty Project** template. In the **Name** field, enter *HelloWorld*. Choose **OK** to create the project.
4848

49-
![Name and create the new project](media/vscpp-concierge-project-name-callouts.png "Name and create the new project")
49+
![Screenshot of the New Project dialog box with Installed > Visual C plus plus selected and called out, the Empty Project option called out, and Hellow World typed in the Name text box.](media/vscpp-concierge-project-name-callouts.png "Name and create the new project")
5050

5151
Visual Studio creates a new, empty project. It's ready for you to specialize for the kind of app you want to create and to add your source code files. You'll do that next.
5252

docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ In this set of tasks, you create a project for your DLL, add code, and build it.
8383

8484
When the solution is created, you can see the generated project and source files in the **Solution Explorer** window in Visual Studio.
8585

86-
![Generated solution in Visual Studio](media/mathlibrary-solution-explorer-162.png "Generated solution in Visual Studio")
86+
![Screenshot of the Visual Studio 2019 Solution Explorer window with the Math Library highlighted.](media/mathlibrary-solution-explorer-162.png "Generated solution in Visual Studio")
8787

8888
::: moniker-end
8989

@@ -95,13 +95,13 @@ When the solution is created, you can see the generated project and source files
9595

9696
1. In the left pane of the **New Project** dialog box, select **Installed** > **Visual C++** > **Windows Desktop**. In the center pane, select **Dynamic-Link Library (DLL)**. Enter *MathLibrary* in the **Name** box to specify a name for the project. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked.
9797

98-
![Name the MathLibrary project](media/mathlibrary-new-project-name-159.png "Name the MathLibrary project")
98+
![Screenshot of the Visual Studio 2017 New Project dialog box showing Math Library in the Name text box.](media/mathlibrary-new-project-name-159.png "Name the MathLibrary project")
9999

100100
1. Choose the **OK** button to create the project.
101101

102102
When the solution is created, you can see the generated project and source files in the **Solution Explorer** window in Visual Studio.
103103

104-
![Generated solution in Visual Studio](media/mathlibrary-solution-explorer-159.png "Generated solution in Visual Studio")
104+
![Screenshot of the Visual Studio 2017 Solution Explorer window with the Math Library highlighted.](media/mathlibrary-solution-explorer-159.png "Generated solution in Visual Studio")
105105

106106
::: moniker-end
107107

@@ -113,7 +113,7 @@ When the solution is created, you can see the generated project and source files
113113

114114
1. In the left pane of the **New Project** dialog box, expand **Installed** > **Templates**, and select **Visual C++**, and then in the center pane, select **Win32 Console Application**. Enter *MathLibrary* in the **Name** edit box to specify a name for the project. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked.
115115

116-
![Name the MathLibrary project](media/mathlibrary-project-name.png "Name the MathLibrary project")
116+
![Screenshot of the Visual Studio 2015 New Project dialog box showing Math Library in the Name text box.](media/mathlibrary-project-name.png "Name the MathLibrary project")
117117

118118
1. Choose the **OK** button to dismiss the **New Project** dialog and start the **Win32 Application Wizard**.
119119

@@ -127,7 +127,7 @@ When the solution is created, you can see the generated project and source files
127127

128128
When the wizard completes the solution, you can see the generated project and source files in the **Solution Explorer** window in Visual Studio.
129129

130-
![Generated solution in Visual Studio](media/mathlibrary-solution-explorer-153.png "Generated solution in Visual Studio")
130+
![Screenshot of the Visual Studio 2015 Solution Explorer window with the Math Library highlighted.](media/mathlibrary-solution-explorer-153.png "Generated solution in Visual Studio")
131131

132132
::: moniker-end
133133

@@ -397,7 +397,7 @@ To avoid out-of-sync code, we recommend you set the include path in your client
397397

398398
1. In the **Configure your new project** page, enter *MathClient* in the **Project name** box to specify a name for the project. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Uncheck **Place solution and project in the same directory** if it's checked.
399399

400-
![Name the client project](media/mathclient-project-name-2019.png "Name the client project")
400+
![Screenshot of the Create a new project dialog box with the Console App option highlighted.](media/mathclient-project-name-2019.png "Name the client project")
401401

402402
1. Choose the **Create** button to create the client project.
403403

@@ -413,7 +413,7 @@ A minimal console application project is created for you. The name for the main
413413

414414
1. In the left pane of the **New Project** dialog, select **Windows Desktop** under **Installed** > **Visual C++**. In the center pane, select **Windows Console Application**. Specify the name for the project, *MathClient*, in the **Name** edit box. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked.
415415

416-
![Name the client project](media/mathclient-new-project-name-159.png "Name the client project")
416+
![Screenshot of the New Project dialog box with Installed > Visual C plus plus > Windows Desktop selected, Windows Console Application highlighted, and Math Client typed in the Name text box.](media/mathclient-new-project-name-159.png "Name the client project")
417417

418418
1. Choose **OK** to create the client app project.
419419

@@ -429,7 +429,7 @@ A minimal console application project is created for you. The name for the main
429429

430430
1. In the left pane of the **New Project** dialog, select **Win32** under **Installed** > **Templates** > **Visual C++**. In the center pane, select **Win32 Console Application**. Specify the name for the project, *MathClient*, in the **Name** edit box. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked.
431431

432-
![Name the client project](media/mathclient-project-name.png "Name the client project")
432+
![Screenshot of the New Project dialog box with Installed > Templates > Visual C plus plus > Win32 selected, Win32 Console Application Visual C plus plus highlighted, and Math Client typed in the Name text box.](media/mathclient-project-name.png "Name the client project")
433433

434434
1. Choose the **OK** button to dismiss the **New Project** dialog and start the **Win32 Application Wizard**. On the **Overview** page of the **Win32 Application Wizard** dialog box, choose the **Next** button.
435435

docs/c-runtime-library/reference/beginthread-beginthreadex.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Multithreaded versions of the [C run-time libraries](../../c-runtime-library/crt
124124

125125
To use **_beginthread** or **_beginthreadex**, the application must link with one of the multithreaded C run-time libraries.
126126

127-
## Example
127+
## Examples
128128

129129
The following example uses **_beginthread** and **_endthread**.
130130

@@ -244,8 +244,6 @@ void Bounce( void * parg )
244244
245245
Press any key to end the sample application.
246246
247-
## Example
248-
249247
The following sample code demonstrates how you can use the thread handle that's returned by **_beginthreadex** with the synchronization API [WaitForSingleObject](/windows/win32/api/synchapi/nf-synchapi-waitforsingleobject). The main thread waits for the second thread to terminate before it continues. When the second thread calls **_endthreadex**, it causes its thread object to go to the signaled state. This allows the primary thread to continue running. This cannot be done with **_beginthread** and **_endthread**, because **_endthread** calls **CloseHandle**, which destroys the thread object before it can be set to the signaled state.
250248
251249
```cpp

0 commit comments

Comments
 (0)