Skip to content
30 changes: 22 additions & 8 deletions docs/build/customize-cmake-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ ms.topic: how-to
---
# Customize CMake build settings

::: moniker range=">=msvc-160"
::: moniker range=">=msvc-180"

The CMake settings editor has been deprecated in Visual Studio 2026.

To learn about changing the *`CMakePresets.json`* file, see [CMakePresets.json and CMakeUserPresets.json Microsoft vendor maps](/cpp/build/cmake-presets-json-reference).

For Visual Studio 2019 to 2022, select your version by using the version selector in the sidebar menu.

::: moniker-end

::: moniker range=">=msvc-160 <=msvc-170"

Visual Studio uses a CMake configuration file to drive CMake generation and build. *`CMakePresets.json`* is supported by Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file. *`CMakePresets.json`* is supported directly by CMake and can be used to drive CMake generation and build from Visual Studio, from VS Code, in a Continuous Integration pipeline, and from the command line on Windows, Linux, and Mac. For more information on *`CMakePresets.json`*, see [Configure and build with CMake Presets](cmake-presets-vs.md).

Expand All @@ -23,6 +33,10 @@ Now you see the **Settings Editor** with the installed configurations on the lef
The left pane shows the installed configurations (x86-Debug). The right pane shows the settings for the selected configuration. The settings include the configuration name, configuration type (set to Debug), toolset (set to msvc_x86), CMake toolchain file (empty), build root (contains ${env:USERPROFILE}\CMakeBuilds\${workspaceHash}\build\${name}), CMake command arguments (empty), and build command arguments (-v).
:::image-end:::

> [!NOTE]
> If a JSON editor opens instead of the **Settings Editor** when you select **Manage Configurations**, you need to enable the CMakeSettings mode. Under **Tools** > **Options** > **CMake**, select **Never use CMake Presets**, and then close and reopen your CMake project. Alternatively, you can choose **Use CMake Presets if available, otherwise use CMakeSettings.json**, and then delete the *CMakePresets.json* file from the project folder.
> :::image type="content" source="media/options-configuration-file.png" alt-text="Screenshot of the C make options pane.":::

Visual Studio provides one `x64-Debug` configuration by default. You can add more configurations by choosing the green plus sign. The settings that you see in the editor might vary depending on which configuration is selected.

The options that you choose in the editor are written to a file called *`CMakeSettings.json`*. This file provides command-line arguments and environment variables that are passed to CMake when you build the projects. Visual Studio never modifies *`CMakeLists.txt`* automatically; by using *`CMakeSettings.json`* you can customize the build through Visual Studio while leaving the CMake project files untouched so that others on your team can consume them with whatever tools they're using.
Expand Down Expand Up @@ -201,11 +215,11 @@ For more information about each of the properties in the file, see [`CMakeSettin

::: moniker-end

## See also
## Related content

[CMake Projects in Visual Studio](cmake-projects-in-visual-studio.md)<br/>
[Configure a Linux CMake project](../linux/cmake-linux-project.md)<br/>
[Connect to your remote Linux computer](../linux/connect-to-your-remote-linux-computer.md)<br/>
[Configure CMake debugging sessions](configure-cmake-debugging-sessions.md)<br/>
[Deploy, run, and debug your Linux project](../linux/deploy-run-and-debug-your-linux-project.md)<br/>
[CMake predefined configuration reference](cmake-predefined-configuration-reference.md)
- [CMake Projects in Visual Studio](cmake-projects-in-visual-studio.md)
- [Configure a Linux CMake project](../linux/cmake-linux-project.md)
- [Connect to your remote Linux computer](../linux/connect-to-your-remote-linux-computer.md)
- [Configure CMake debugging sessions](configure-cmake-debugging-sessions.md)
- [Deploy, run, and debug your Linux project](../linux/deploy-run-and-debug-your-linux-project.md)
- [CMake predefined configuration reference](cmake-predefined-configuration-reference.md)
Binary file added docs/build/media/options-configuration-file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This article discusses using the **Properties** window (in **Class View**) to in
> [!NOTE]
> This article uses a dialog-based ActiveX control container project named Container and an embedded control named Circ as examples in the procedures and code.

Using the Events button in the **Properties** window (in **Class View**), you can create a map of events that can occur in your ActiveX control container application. This map, called an "event sink map,'' is created and maintained by Visual C++ when you add event handlers to the control container class. Each event handler, implemented with an event map entry, maps a specific event to a container event handler member function. This event handler function is called when the specified event is fired by the ActiveX control object.
Using the Events button in the **Properties** window (in **Class View**), you can create a map of events that can occur in your ActiveX control container application. This map, called an "event sink map,'' is created and maintained by Visual Studio when you add event handlers to the control container class. Each event handler, implemented with an event map entry, maps a specific event to a container event handler member function. This event handler function is called when the specified event is fired by the ActiveX control object.

For more information on event sink maps, see [Event Sink Maps](reference/event-sink-maps.md) in the *Class Library Reference*.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ms.assetid: 46f195b0-b8ca-4409-8cca-fbfaf2c9ab9f
---
# ActiveX Control Containers: Using Controls in a Non-Dialog Container

In some applications, such as an SDI or MDI application, you will want to embed a control in a window of the application. The **Create** member function of the wrapper class, inserted by Visual C++, can create an instance of the control dynamically, without the need for a dialog box.
In some applications, such as an SDI or MDI application, you will want to embed a control in a window of the application. The **Create** member function of the wrapper class, inserted by Visual Studio, can create an instance of the control dynamically, without the need for a dialog box.

The **Create** member function has the following parameters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ms.assetid: 14ce5152-742b-4e0d-a9ab-c7b456e32918
---
# ActiveX Control Containers: Viewing and Modifying Control Properties

When you insert an ActiveX control into a project, it is useful to view and change the properties supported by the ActiveX control. This article discusses how to use the Visual C++ resource editor to do this.
When you insert an ActiveX control into a project, it is useful to view and change the properties supported by the ActiveX control. This article discusses how to use the Visual Studio resource editor to do this.

If your ActiveX control container application uses embedded controls, you can view and modify the control's properties while in the resource editor. You can also use the resource editor to set property values during design time. The resource editor then automatically saves these values in the project's resource file. Any instance of the control will then have its properties initialized to these values.

Expand Down
4 changes: 2 additions & 2 deletions docs/mfc/activex-control-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Control containers typically take two forms in a project:

The ActiveX control container interacts with the control via exposed [methods](mfc-activex-controls-methods.md) and [properties](mfc-activex-controls-properties.md). These methods and properties, which can be accessed and modified by the control container, are accessed through a wrapper class in the ActiveX control container project. The embedded ActiveX control can also interact with the container by firing (sending) [events](mfc-activex-controls-events.md) to notify the container that an action has occurred. The control container can choose to act upon these notifications or not.

Additional articles discuss several topics, from creating an ActiveX control container project to basic implementation issues related to ActiveX control containers built with Visual C++:
Additional articles discuss several topics, from creating an ActiveX control container project to basic implementation issues related to ActiveX control containers built with Visual Studio:

- [Creating an MFC ActiveX Control Container](reference/creating-an-mfc-activex-control-container.md)

Expand All @@ -42,7 +42,7 @@ Additional articles discuss several topics, from creating an ActiveX control con

For more information about using ActiveX controls in a dialog box, see the [Dialog Editor](../windows/dialog-editor.md) topics.

For a list of articles that explain the details of developing ActiveX controls using Visual C++ and the MFC ActiveX control classes, see [MFC ActiveX controls](mfc-activex-controls.md). The articles are grouped by functional categories.
For a list of articles that explain the details of developing ActiveX controls using Visual Studio and the MFC ActiveX control classes, see [MFC ActiveX controls](mfc-activex-controls.md). The articles are grouped by functional categories.

## See also

Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/activex-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ms.assetid: 52aaec4d-3889-402e-b57d-758078f8ac57
---
# ActiveX Controls

In Visual C++ you can create ActiveX controls using MFC or ATL.
In Visual Studio you can create ActiveX controls using MFC or ATL.

>[!IMPORTANT]
> ActiveX is a legacy technology that should not be used for new development. Many capabilities of ActiveX controls can be performed in a simpler and much more secure way with modern technologies such as HTML5 and JavaScript, modern browser extensions, or WebAssembly modules. For more information, see [A break from the past, part 2: Saying goodbye to ActiveX, VBScript, attachEvent](https://blogs.windows.com/msedgedev/2015/05/06/a-break-from-the-past-part-2-saying-goodbye-to-activex-vbscript-attachevent/) and [Native Messaging](/microsoft-edge/extensions/guides/native-messaging) and [Microsoft Edge extensions](/microsoft-edge/extensions) and [WebAssembly](https://webassembly.org/).
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/alternatives-to-the-document-view-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To create an application that does not use the document/view architecture, clear
> [!NOTE]
> Dialog-based applications produced by the MFC Application Wizard do not use the document/view architecture, so the **Document/View architecture support** check box is disabled if you select the dialog application type.

The Visual C++ wizards, as well as the source and dialog editors, work with the generated application just as they would with any other Wizard-generated application. The application can support toolbars, scrollbars, and a status bar, and has an **About** box. Your application will not register any document templates, and it will not contain a document class.
The Visual Studio wizards, as well as the source and dialog editors, work with the generated application just as they would with any other Wizard-generated application. The application can support toolbars, scrollbars, and a status bar, and has an **About** box. Your application will not register any document templates, and it will not contain a document class.

Note that your generated application has a view class, `CChildView`, derived from `CWnd`. MFC creates and positions one instance of the view class within the frame windows created by your application. MFC still enforces using a view window, because it simplifies positioning and managing the application's content. You can add painting code to the `OnPaint` member of this class. Your code should add scrollbars to the view rather than to the frame.

Expand Down
4 changes: 2 additions & 2 deletions docs/mfc/automation-clients-using-type-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ This type information can be made known in several ways. The recommended way is

For information on [MkTypLib](/windows/win32/Midl/differences-between-midl-and-mktyplib), see the Windows SDK.

Visual C++ can read a type-library file and create a dispatch class derived from [COleDispatchDriver](reference/coledispatchdriver-class.md). An object of that class has properties and operations duplicating those of the server object. Your application calls this object's properties and operations, and functionality inherited from `COleDispatchDriver` routes these calls to the OLE system, which in turn routes them to the server object.
Visual Studio can read a type-library file and create a dispatch class derived from [COleDispatchDriver](reference/coledispatchdriver-class.md). An object of that class has properties and operations duplicating those of the server object. Your application calls this object's properties and operations, and functionality inherited from `COleDispatchDriver` routes these calls to the OLE system, which in turn routes them to the server object.

Visual C++ automatically maintains this type-library file for you if you chose to include Automation when the project was created. As part of each build, the .tlb file will be built with MkTypLib.
Visual Studio automatically maintains this type-library file for you if you chose to include Automation when the project was created. As part of each build, the .tlb file will be built with MkTypLib.

### To create a dispatch class from a type-library (.tlb) file

Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/automation-servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ By exposing application functionality through a common, well-defined interface,

## <a name="_core_support_for_automation_servers"></a> Support for Automation Servers

Visual C++ and the MFC framework provide extensive support for Automation servers. They handle much of the overhead involved in making an Automation server, so you can focus your efforts on the functionality of your application.
Visual Studio and the MFC framework provide extensive support for Automation servers. They handle much of the overhead involved in making an Automation server, so you can focus your efforts on the functionality of your application.

The framework's principal mechanism for supporting Automation is the dispatch map, a set of macros that expands into the declarations and calls needed to expose methods and properties for OLE. A typical dispatch map looks like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ As another example, a word processor might expose its spell-checking functionali

More important is the support Automation provides to users and solution providers. By exposing application functionality through a common, well-defined interface, Automation makes it possible to build comprehensive solutions in a single general programming language, such as Microsoft Visual Basic, instead of in diverse application-specific macro languages.

Many commercial applications, such as Microsoft Excel and Microsoft Visual C++, allow you to automate much of their functionality. For example, in Visual C++, you can write VBScript macros to automate builds, aspects of code editing, or debugging tasks.
Many commercial applications, such as Microsoft Excel and Visual Studio, allow you to automate much of their functionality. For example, in Visual Studio, you can write VBScript macros to automate builds, aspects of code editing, or debugging tasks.

## <a name="_core_passing_parameters_in_automation"></a> Passing Parameters in Automation

Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/clipboard-using-the-windows-clipboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Cut, Copy, and Paste commands are only meaningful in certain contexts. The C

The Microsoft Foundation Class Library does provide Clipboard support for text editing with the `CEdit` and `CEditView` classes. The OLE classes also simplify implementing Clipboard operations that involve OLE items. For more information on the OLE classes, see [Clipboard: Using the OLE Clipboard Mechanism](clipboard-using-the-ole-clipboard-mechanism.md).

Implementing other Edit menu commands, such as Undo (**ID_EDIT_UNDO**) and Redo (**ID_EDIT_REDO**), is also left to you. If your application does not support these commands, you can easily delete them from your resource file using the Visual C++ resource editors.
Implementing other Edit menu commands, such as Undo (**ID_EDIT_UNDO**) and Redo (**ID_EDIT_REDO**), is also left to you. If your application does not support these commands, you can easily delete them from your resource file using the Visual Studio resource editors.

## What do you want to know more about

Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/command-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A command is fully described by its command ID alone (encoded in the **WM_COMMAN

For example, a Clear All item in the Edit menu might be assigned an ID such as **ID_EDIT_CLEAR_ALL**. The class library predefines some IDs, particularly for commands that the framework handles itself, such as **ID_EDIT_CLEAR_ALL** or **ID_FILE_OPEN**. You will create other command IDs yourself.

When you create your own menus in the Visual C++ menu editor, it is a good idea to follow the class library's naming convention as illustrated by **ID_FILE_OPEN**. [Standard Commands](standard-commands.md) explains the standard commands defined by the class library.
When you create your own menus in the Visual Studio menu editor, it is a good idea to follow the class library's naming convention as illustrated by **ID_FILE_OPEN**. [Standard Commands](standard-commands.md) explains the standard commands defined by the class library.

## See also

Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/containers-for-activex-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ms.assetid: 5ff0bf37-07f4-49aa-ad9c-c63d3756243a
---
# Containers for ActiveX Controls

You can use ActiveX controls developed in Visual C++ in other applications, as long as they support ActiveX control containment. A number of Microsoft applications, beginning with the versions listed, support ActiveX control containment.
You can use ActiveX controls developed in Visual Studio in other applications, as long as they support ActiveX control containment. A number of Microsoft applications, beginning with the versions listed, support ActiveX control containment.

>[!IMPORTANT]
> ActiveX is a legacy technology that should not be used for new development. For more information about modern technologies that supersede ActiveX, see [ActiveX Controls](activex-controls.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/controls-mfc.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Controls are objects that users can interact with to enter or manipulate data. T

## Windows Common Controls

The Windows operating system has always provided a number of Windows common controls. These control objects are programmable, and the Visual C++ dialog editor supports adding them to your dialog boxes. The Microsoft Foundation Class Library (MFC) supplies classes that encapsulate each of these controls, as shown in the table [Windows Common Controls and MFC Classes](#_core_windows_common_controls_and_mfc_classes). (Some items in the table have related topics that describe them further. For controls that lack topics, see the documentation for the MFC class.)
The Windows operating system has always provided a number of Windows common controls. These control objects are programmable, and the Visual Studio dialog editor supports adding them to your dialog boxes. The Microsoft Foundation Class Library (MFC) supplies classes that encapsulate each of these controls, as shown in the table [Windows Common Controls and MFC Classes](#_core_windows_common_controls_and_mfc_classes). (Some items in the table have related topics that describe them further. For controls that lack topics, see the documentation for the MFC class.)

Class [CWnd](reference/cwnd-class.md) is the base class of all window classes, including all of the control classes.

Expand Down
2 changes: 1 addition & 1 deletion docs/mfc/crebar-vs-crebarctrl.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MFC provides two classes to create rebars: [CReBar](reference/crebar-class.md) a

`CReBarCtrl` is a wrapper class for the Win32 rebar control, and therefore may be easier to implement if you do not intend to integrate the rebar into the MFC architecture. If you plan to use `CReBarCtrl` and integrate the rebar into the MFC architecture, you must take additional care to communicate rebar control manipulations to MFC. This communication is not difficult; however, it is additional work that is unneeded when you use `CReBar`.

Visual C++ provides two ways to take advantage of the rebar common control.
Visual Studio provides two ways to take advantage of the rebar common control.

- Create the rebar using `CReBar`, and then call [CReBar::GetReBarCtrl](reference/crebar-class.md#getrebarctrl) to get access to the `CReBarCtrl` member functions.

Expand Down
Loading