Skip to content

Commit

Permalink
Merge pull request #1776 from msebolt/resource-file-consolidation-pr62
Browse files Browse the repository at this point in the history
resource file consolidation pr62
  • Loading branch information
ktoliver committed Feb 15, 2019
2 parents ec4369d + 6c22c90 commit b99da89
Show file tree
Hide file tree
Showing 17 changed files with 465 additions and 634 deletions.
5 changes: 5 additions & 0 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -8140,6 +8140,11 @@
"redirect_url": "/cpp/windows/image-editor-for-icons",
"redirect_document_id": false
},
{
"source_path": "docs/windows/creating-a-menu.md",
"redirect_url": "/cpp/windows/menu-editor",
"redirect_document_id": false
},
{
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",
Expand Down
17 changes: 8 additions & 9 deletions docs/windows/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,18 @@
##### [Accelerator Keys](predefined-accelerator-keys.md)
#### [Binary Editor](binary-editor.md)
#### [Dialog Editor](dialog-editor.md)
##### [Creating a Dialog Box](creating-a-new-dialog-box.md)
##### [How to: Create a Dialog Box](creating-a-new-dialog-box.md)
##### [Controls in Dialog Boxes](controls-in-dialog-boxes.md)
###### [Adding, Editing, or Deleting Controls](adding-editing-or-deleting-controls.md)
###### [Arrangement of Controls on Dialog Boxes](arrangement-of-controls-on-dialog-boxes.md)
###### [Defining Control Access and Values](defining-mnemonics-access-keys.md)
###### [How to: Add, Edit, or Delete Controls](adding-editing-or-deleting-controls.md)
###### [How to: Arrange Controls](arrangement-of-controls-on-dialog-boxes.md)
###### [How to: Define Control Access and Values](defining-mnemonics-access-keys.md)
#### [Image Editor for Icons](image-editor-for-icons.md)
##### [Creating an Icon or Other Image](creating-an-icon-or-other-image-image-editor-for-icons.md)
##### [Editing an Image](selecting-an-area-of-an-image-image-editor-for-icons.md)
##### [Using a Drawing Tool](using-a-drawing-tool-image-editor-for-icons.md)
##### [Working with Color](working-with-color-image-editor-for-icons.md)
##### [How to: Create an Icon or Other Image](creating-an-icon-or-other-image-image-editor-for-icons.md)
##### [How to: Edit an Image](selecting-an-area-of-an-image-image-editor-for-icons.md)
##### [How to: Use a Drawing Tool](using-a-drawing-tool-image-editor-for-icons.md)
##### [How to: Work with Color](working-with-color-image-editor-for-icons.md)
##### [Accelerator Keys](accelerator-keys-image-editor-for-icons.md)
#### [Menu Editor](menu-editor.md)
##### [Creating and Editing Menus](creating-a-menu.md)
##### [Menu Commands](menu-command-properties.md)
#### [String Editor](string-editor.md)
#### [Toolbar Editor](toolbar-editor.md)
Expand Down
4 changes: 1 addition & 3 deletions docs/windows/accelerator-keys-image-editor-for-icons.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Accelerator Keys (C++ Image Editor for Icons)"
ms.date: "11/04/2016"
ms.date: "02/15/2019"
f1_keywords: ["vc.editors.bitmap", "vc.editors.icon"]
helpviewer_keywords: ["accelerator keys", "Image editor [C++], accelerator keys"]
ms.assetid: add37861-3e17-4a6f-89e8-46df12e74a90
Expand Down Expand Up @@ -52,8 +52,6 @@ Below are the accelerator keys for the Image editor commands that are bound to k
|Image.ZoomIn|**Ctrl** + **Shift** + **.** (period)<br /><br /> - or -<br /><br /> **Ctrl** + **Up Arrow**|Increases the magnification for the current view.|
|Image.ZoomOut|**Ctrl** + **,** (comma)<br /><br /> - or -<br /><br /> **Ctrl** + **Down Arrow**|Reduces the magnification of the current view.|

For information on adding resources to managed projects, please see [Resources in Desktop Apps](/dotnet/framework/resources/index) in the *.NET Framework Developer's Guide*. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resource strings to properties, see [Creating Resource Files for Desktop Apps](/dotnet/framework/resources/creating-resource-files-for-desktop-apps). For information on globalization and localization of resources in managed apps, see [Globalizing and Localizing .NET Framework Applications](/dotnet/standard/globalization-localization/index).

## Requirements

None
Expand Down
140 changes: 64 additions & 76 deletions docs/windows/adding-editing-or-deleting-controls.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
---
title: "Adding, Editing, or Deleting Controls"
ms.date: "11/04/2016"
title: "How To: Add, Edit, or Delete Controls"
ms.date: "02/15/2019"
f1_keywords: ["vc.editors.dialog.dialog", "vc.controls.activex", "vc.editors.dialog.insertActiveXControls"]
helpviewer_keywords: ["Dialog Editor [C++], creating controls", "dialog boxes [C++], adding controls to", "Toolbox [C++], Dialog Editor tab", "controls [C++], types", "syslink controls in dialog boxes", "custom controls [C++], dialog boxes", "controls [C++], standard", "Dialog Editor [C++], creating controls", "controls [C++], adding to dialog boxes", "controls [C++], adding multiple", "dialog box controls [C++], size", "controls [C++], sizing", "dialog boxes [C++], adding ActiveX controls", "ActiveX controls [C++], adding to dialog boxes", "Insert ActiveX Control dialog box [C++]", "controls [C++], editing properties", "ActiveX controls [C++], properties", "controls [C++], undoing changes", "controls [C++], editing properties", "dialog box controls [C++], editing properties", "dialog box controls [C++], deleting", "controls [C++], deleting", "Dialog Editor [C++], default control events", "controls [C++], default control events", "events [C++], controls", "dialog box controls [C++], events", "member variables, defining for controls", "variables, dialog box control member variables", "controls [C++], member variables", "Dialog Editor [C++], defining member variables for controls", "controls [C++], troubleshooting", "Dialog Editor [C++], troubleshooting", "dialog boxes [C++], troubleshooting", "InitCommonControls", "RichEdit 1.0 control", "rich edit controls [C++], RichEdit 1.0"]
ms.assetid: 73cef03f-5c8c-456a-87d1-1458dff185cf
---
# Adding, Editing, or Deleting Controls
# How To: Add, Edit, or Delete Controls

Using the **Dialog** editor, you can add, resize, edit, and delete controls in dialog boxes. You can also edit the properties of a control, such as its ID, or whether it's initially visible at run time.

The **Dialog Editor** tab appears in the [Toolbox window](/visualstudio/ide/reference/toolbox) when you're working in the **Dialog** editor. You can also customize the **Toolbox** window for easier use. For more information, see [Using the Toolbox](/visualstudio/ide/using-the-toolbox) and [Show or hide the Toolbox window](showing-or-hiding-the-dialog-editor-toolbar.md).

You can use the shortcut menu in the **Dialog** editor to quickly add registered ActiveX controls to a dialog box, and you can add ActiveX controls to the **Toolbox** for quick access.

For information on adding resources to managed projects, see [Resources in Desktop Apps](/dotnet/framework/resources/index) in the *.NET Framework Developer's Guide*. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resource strings to properties, see [Creating Resource Files for Desktop Apps](/dotnet/framework/resources/creating-resource-files-for-desktop-apps). For information on globalization and localization of resources in managed apps, see [Globalizing and Localizing .NET Framework Applications](/dotnet/standard/globalization-localization/index).
> [!TIP]
> While using the **Dialog** editor, in many instances, you can select the right mouse button to display a shortcut menu of frequently used commands.
## To add a control
## Add Controls

To add controls to your new dialog box, drag controls from the **Toolbox** to the dialog box you're creating. You can then move the controls around or change their size and shape.

You can add custom controls to the dialog box by selecting the **Custom Control** icon in the **Toolbox** and dragging it to your dialog box. To add a **Syslink** control, add a custom control, then change the control's **Class** property to **Syslink**. This action will cause the properties to refresh and show the **Syslink** control properties. For information on the MFC wrapper class, see [CLinkCtrl](../mfc/reference/clinkctrl-class.md).

### To add a control to a dialog box
### To add a control

1. Ensure that the dialog box tabbed window is the current document in the editor frame. If a dialog isn't the current document, you won't see the **Dialog Editor Tab** in the **Toolbox**.

1. On the **Dialog Editor** tab of the **Toolbox** window, select the control you want, then:

Select the dialog box at the location where you want to place the control. The control appears where you've selected.
1. On the **Dialog Editor** tab of the **Toolbox** window, select the control you want, then either:

\- or -
- Select the dialog box at the location where you want to place the control. The control appears where you've selected.

Drag and drop the control from the **Toolbox** window to the location on your dialog box.
- Drag and drop the control from the **Toolbox** window to the location on your dialog box.

\- or -

Double-click the control in the **Toolbox** window (it appears on your dialog box) then reposition the control to the location you prefer.
- Double-click the control in the **Toolbox** window (it appears on your dialog box), then reposition the control to the location you prefer.

### To add multiple controls

Expand All @@ -61,40 +56,7 @@ You can add custom controls to the dialog box by selecting the **Custom Control*
> [!TIP]
> You can resize the control after dropping it onto the dialog box by moving the sizing handles on the border of the control. For more information, see [Sizing Individual Controls](../windows/sizing-individual-controls.md).
### To add an ActiveX control

Visual Studio enables you to insert ActiveX controls into your dialog box. For more information, see [MFC ActiveX Controls](../mfc/mfc-activex-controls.md) and [ActiveX Control Containers](../mfc/activex-control-containers.md).

The **Insert ActiveX Control** dialog box enables you to insert ActiveX controls into your dialog box while using the [Dialog editor](../windows/dialog-editor.md). This dialog contains the following properties:

|Property|Description|
|---|---|
|**ActiveX Control**|Displays a list of Active X controls. Inserting a control from this dialog box doesn't generate a wrapper class. If you need a wrapper class, use [Class View](/visualstudio/ide/viewing-the-structure-of-code) to create one (for more information, see [Adding a Class](../ide/adding-a-class-visual-cpp.md)). If an Active X control doesn't appear in this dialog box, try installing the control according to the vendor's instructions.|
|**Path**|Displays the file in which the ActiveX control is found.|

#### To see the ActiveX controls available

1. Open a dialog box in the Dialog editor.

1. Right-click anywhere in the body of the dialog box.

1. On the shortcut menu, select **Insert ActiveX Control**.

The **Insert ActiveX Control** dialog box appears, showing all the ActiveX controls on your system. At the bottom of the dialog box, the path to the ActiveX Control file appears.

#### To add an ActiveX control to a dialog box

1. In the **Insert ActiveX Control** dialog box, select the control you want to add to your dialog box and select **OK**.

The control appears in the dialog box, where you can edit it or create handlers for it just as you would any other control.

> [!NOTE]
> You can add ActiveX controls to the **Toolbox** window for easy access.
> [!CAUTION]
> It may not be legal to distribute all of the ActiveX controls on your system. Please refer to the license agreement for the software that installed the controls or contact the software company.
## To edit a control
## Edit Controls

### To edit the properties of a control or controls

Expand All @@ -114,21 +76,6 @@ The **Insert ActiveX Control** dialog box enables you to insert ActiveX controls

1. Choose **Undo** from the **Edit** menu (if focus isn't on the control, the **Undo** command will be unavailable).

### To edit properties for an ActiveX control

ActiveX controls supplied by independent vendors may come equipped with their own properties and characteristics. Properties for ActiveX controls are displayed in the **Properties** window. Also, any property pages created by the writers of the ActiveX control are displayed in the **Properties Pages** dialog box (to view the **Property Page** for a specific ActiveX control, click the **Property Page** button in the [Properties Window](/visualstudio/ide/reference/properties-window)).

Various tabs are displayed in the property page for an ActiveX control, depending on the property sheets that come as part of the ActiveX control.

> [!NOTE]
> The following procedure applies to using the property page to edit ActiveX controls. You can also browse and edit ActiveX properties in the new **Properties** window.
1. Select the **ActiveX** control.

1. On the **View** menu, select **Property Page** and view the properties.

1. Make changes as needed in the property page.

### To define a member variable for a (non-button) dialog box control

To define a member variable for any dialog box control except buttons, you can use the following method.
Expand All @@ -151,22 +98,17 @@ To define a member variable for any dialog box control except buttons, you can u
You can also use the **Member Variables** tab in the [MFC Class Wizard](../mfc/reference/mfc-class-wizard.md) to add new member variables for a specified class, and view member variables that have already been defined.

## To delete a control
## Delete Controls

In the dialog box, select the control and press the **Delete** key.
In the dialog box, select the control, then press the **Delete** key, or go to the **Edit** menu and select **Delete**.

\- or -
## Other Issues

On the **Edit** menu, select **Delete**.

> [!TIP]
> While using the **Dialog** editor, in many instances, you can click the right mouse button to display a shortcut menu of frequently used commands.
## Known issue
### Troubleshooting

After adding a common control or rich edit control to a dialog box, it won't appear when you test the dialog box or the dialog itself won't appear.

To see an example of the problem:
For an example of the problem:

1. Create a Win32 project, modifying the application settings so you create a Windows application (not a console app).

Expand All @@ -180,7 +122,7 @@ To see an example of the problem:

1. Execute the program.

1. On the dialog box's **Help** menu, click the **About** command; no dialog box is displayed.
1. On the dialog box's **Help** menu, select the **About** command and observe no dialog box is displayed.

Currently, the **Dialog** editor doesn't automatically add code to your project when you drag and drop the following common controls or rich edit controls onto a dialog box. Nor does Visual Studio provide an error or warning when this problem occurs. To fix, add the code for the control manually.

Expand All @@ -201,6 +143,52 @@ To use RichEdit controls, you must call `LoadLibrary`. For more information, see
>
> You may use the current [CRichEditCtrl](../mfc/reference/cricheditctrl-class.md) class with the older RichEdit 1.0 control, but `CRichEditCtrl` is only designed to support the RichEdit 2.0 control. Because RichEdit 1.0 and RichEdit 2.0 are similar, most methods will work. However, note there are some differences between the 1.0 and 2.0 controls, so some methods might work incorrectly or not work at all.
### ActiveX Controls

Visual Studio enables you to insert ActiveX controls into your dialog box. For more information, see [MFC ActiveX Controls](../mfc/mfc-activex-controls.md) and [ActiveX Control Containers](../mfc/activex-control-containers.md).

You can use the shortcut menu in the **Dialog** editor to quickly add registered ActiveX controls to a dialog box, and you can add ActiveX controls to the **Toolbox** for quick access.

The **Insert ActiveX Control** dialog box enables you to insert ActiveX controls into your dialog box while using the [Dialog editor](../windows/dialog-editor.md). This dialog contains the following properties:

|Property|Description|
|---|---|
|**ActiveX Control**|Displays a list of Active X controls. Inserting a control from this dialog box doesn't generate a wrapper class. If you need a wrapper class, use [Class View](/visualstudio/ide/viewing-the-structure-of-code) to create one (for more information, see [Adding a Class](../ide/adding-a-class-visual-cpp.md)). If an Active X control doesn't appear in this dialog box, try installing the control according to the vendor's instructions.|
|**Path**|Displays the file in which the ActiveX control is found.|

> [!CAUTION]
> It may not be legal to distribute all of the ActiveX controls on your system. Please refer to the license agreement for the software that installed the controls or contact the software company.
#### To add an ActiveX control

1. Open a dialog box in the **Dialog** editor.

1. Right-click anywhere in the body of the dialog box and on the shortcut menu, select **Insert ActiveX Control**.

The **Insert ActiveX Control** dialog box appears, showing all the ActiveX controls on your system. At the bottom of the dialog box, the path to the ActiveX Control file appears.

1. Select the control you want to add to your dialog box and choose **OK**.

The control appears in the dialog box, where you can edit it or create handlers for it just as you would any other control.

> [!NOTE]
> You can add ActiveX controls to the **Toolbox** window for easy access.
#### To edit properties for an ActiveX control

ActiveX controls supplied by independent vendors may come equipped with their own properties and characteristics. Properties for ActiveX controls are displayed in the **Properties** window. Also, any property pages created by the writers of the ActiveX control are displayed in the **Properties Pages** dialog box (to view the **Property Page** for a specific ActiveX control, click the **Property Page** button in the [Properties Window](/visualstudio/ide/reference/properties-window)).

Various tabs are displayed in the property page for an ActiveX control, depending on the property sheets that come as part of the ActiveX control.

> [!NOTE]
> The following procedure applies to using the property page to edit ActiveX controls. You can also browse and edit ActiveX properties in the new **Properties** window.
1. Select the **ActiveX** control.

1. On the **View** menu, select **Property Page** and view the properties.

1. Make changes as needed in the property page.

## Requirements

Win32
Expand Down

0 comments on commit b99da89

Please sign in to comment.