Skip to content

Commit 24592ba

Browse files
authored
Merge pull request #1777 from MicrosoftDocs/master
219/2/18 AM Publish
2 parents 470de13 + b99da89 commit 24592ba

17 files changed

+465
-634
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8140,6 +8140,11 @@
81408140
"redirect_url": "/cpp/windows/image-editor-for-icons",
81418141
"redirect_document_id": false
81428142
},
8143+
{
8144+
"source_path": "docs/windows/creating-a-menu.md",
8145+
"redirect_url": "/cpp/windows/menu-editor",
8146+
"redirect_document_id": false
8147+
},
81438148
{
81448149
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
81458150
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

docs/windows/TOC.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,18 @@
2525
##### [Accelerator Keys](predefined-accelerator-keys.md)
2626
#### [Binary Editor](binary-editor.md)
2727
#### [Dialog Editor](dialog-editor.md)
28-
##### [Creating a Dialog Box](creating-a-new-dialog-box.md)
28+
##### [How to: Create a Dialog Box](creating-a-new-dialog-box.md)
2929
##### [Controls in Dialog Boxes](controls-in-dialog-boxes.md)
30-
###### [Adding, Editing, or Deleting Controls](adding-editing-or-deleting-controls.md)
31-
###### [Arrangement of Controls on Dialog Boxes](arrangement-of-controls-on-dialog-boxes.md)
32-
###### [Defining Control Access and Values](defining-mnemonics-access-keys.md)
30+
###### [How to: Add, Edit, or Delete Controls](adding-editing-or-deleting-controls.md)
31+
###### [How to: Arrange Controls](arrangement-of-controls-on-dialog-boxes.md)
32+
###### [How to: Define Control Access and Values](defining-mnemonics-access-keys.md)
3333
#### [Image Editor for Icons](image-editor-for-icons.md)
34-
##### [Creating an Icon or Other Image](creating-an-icon-or-other-image-image-editor-for-icons.md)
35-
##### [Editing an Image](selecting-an-area-of-an-image-image-editor-for-icons.md)
36-
##### [Using a Drawing Tool](using-a-drawing-tool-image-editor-for-icons.md)
37-
##### [Working with Color](working-with-color-image-editor-for-icons.md)
34+
##### [How to: Create an Icon or Other Image](creating-an-icon-or-other-image-image-editor-for-icons.md)
35+
##### [How to: Edit an Image](selecting-an-area-of-an-image-image-editor-for-icons.md)
36+
##### [How to: Use a Drawing Tool](using-a-drawing-tool-image-editor-for-icons.md)
37+
##### [How to: Work with Color](working-with-color-image-editor-for-icons.md)
3838
##### [Accelerator Keys](accelerator-keys-image-editor-for-icons.md)
3939
#### [Menu Editor](menu-editor.md)
40-
##### [Creating and Editing Menus](creating-a-menu.md)
4140
##### [Menu Commands](menu-command-properties.md)
4241
#### [String Editor](string-editor.md)
4342
#### [Toolbar Editor](toolbar-editor.md)

docs/windows/accelerator-keys-image-editor-for-icons.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Accelerator Keys (C++ Image Editor for Icons)"
3-
ms.date: "11/04/2016"
3+
ms.date: "02/15/2019"
44
f1_keywords: ["vc.editors.bitmap", "vc.editors.icon"]
55
helpviewer_keywords: ["accelerator keys", "Image editor [C++], accelerator keys"]
66
ms.assetid: add37861-3e17-4a6f-89e8-46df12e74a90
@@ -52,8 +52,6 @@ Below are the accelerator keys for the Image editor commands that are bound to k
5252
|Image.ZoomIn|**Ctrl** + **Shift** + **.** (period)<br /><br /> - or -<br /><br /> **Ctrl** + **Up Arrow**|Increases the magnification for the current view.|
5353
|Image.ZoomOut|**Ctrl** + **,** (comma)<br /><br /> - or -<br /><br /> **Ctrl** + **Down Arrow**|Reduces the magnification of the current view.|
5454

55-
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).
56-
5755
## Requirements
5856

5957
None

docs/windows/adding-editing-or-deleting-controls.md

Lines changed: 64 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,36 @@
11
---
2-
title: "Adding, Editing, or Deleting Controls"
3-
ms.date: "11/04/2016"
2+
title: "How To: Add, Edit, or Delete Controls"
3+
ms.date: "02/15/2019"
44
f1_keywords: ["vc.editors.dialog.dialog", "vc.controls.activex", "vc.editors.dialog.insertActiveXControls"]
55
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"]
66
ms.assetid: 73cef03f-5c8c-456a-87d1-1458dff185cf
77
---
8-
# Adding, Editing, or Deleting Controls
8+
# How To: Add, Edit, or Delete Controls
99

1010
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.
1111

1212
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).
1313

14-
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.
15-
16-
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).
14+
> [!TIP]
15+
> While using the **Dialog** editor, in many instances, you can select the right mouse button to display a shortcut menu of frequently used commands.
1716
18-
## To add a control
17+
## Add Controls
1918

2019
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.
2120

2221
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).
2322

24-
### To add a control to a dialog box
23+
### To add a control
2524

2625
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**.
2726

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

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

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

36-
\- or -
37-
38-
Double-click the control in the **Toolbox** window (it appears on your dialog box) then reposition the control to the location you prefer.
33+
- Double-click the control in the **Toolbox** window (it appears on your dialog box), then reposition the control to the location you prefer.
3934

4035
### To add multiple controls
4136

@@ -61,40 +56,7 @@ You can add custom controls to the dialog box by selecting the **Custom Control*
6156
> [!TIP]
6257
> 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).
6358
64-
### To add an ActiveX control
65-
66-
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).
67-
68-
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:
69-
70-
|Property|Description|
71-
|---|---|
72-
|**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.|
73-
|**Path**|Displays the file in which the ActiveX control is found.|
74-
75-
#### To see the ActiveX controls available
76-
77-
1. Open a dialog box in the Dialog editor.
78-
79-
1. Right-click anywhere in the body of the dialog box.
80-
81-
1. On the shortcut menu, select **Insert ActiveX Control**.
82-
83-
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.
84-
85-
#### To add an ActiveX control to a dialog box
86-
87-
1. In the **Insert ActiveX Control** dialog box, select the control you want to add to your dialog box and select **OK**.
88-
89-
The control appears in the dialog box, where you can edit it or create handlers for it just as you would any other control.
90-
91-
> [!NOTE]
92-
> You can add ActiveX controls to the **Toolbox** window for easy access.
93-
94-
> [!CAUTION]
95-
> 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.
96-
97-
## To edit a control
59+
## Edit Controls
9860

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

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

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

117-
### To edit properties for an ActiveX control
118-
119-
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)).
120-
121-
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.
122-
123-
> [!NOTE]
124-
> 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.
125-
126-
1. Select the **ActiveX** control.
127-
128-
1. On the **View** menu, select **Property Page** and view the properties.
129-
130-
1. Make changes as needed in the property page.
131-
13279
### To define a member variable for a (non-button) dialog box control
13380

13481
To define a member variable for any dialog box control except buttons, you can use the following method.
@@ -151,22 +98,17 @@ To define a member variable for any dialog box control except buttons, you can u
15198
15299
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.
153100

154-
## To delete a control
101+
## Delete Controls
155102

156-
In the dialog box, select the control and press the **Delete** key.
103+
In the dialog box, select the control, then press the **Delete** key, or go to the **Edit** menu and select **Delete**.
157104

158-
\- or -
105+
## Other Issues
159106

160-
On the **Edit** menu, select **Delete**.
161-
162-
> [!TIP]
163-
> While using the **Dialog** editor, in many instances, you can click the right mouse button to display a shortcut menu of frequently used commands.
164-
165-
## Known issue
107+
### Troubleshooting
166108

167109
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.
168110

169-
To see an example of the problem:
111+
For an example of the problem:
170112

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

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

181123
1. Execute the program.
182124

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

185127
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.
186128

@@ -201,6 +143,52 @@ To use RichEdit controls, you must call `LoadLibrary`. For more information, see
201143
>
202144
> 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.
203145
146+
### ActiveX Controls
147+
148+
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).
149+
150+
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.
151+
152+
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:
153+
154+
|Property|Description|
155+
|---|---|
156+
|**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.|
157+
|**Path**|Displays the file in which the ActiveX control is found.|
158+
159+
> [!CAUTION]
160+
> 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.
161+
162+
#### To add an ActiveX control
163+
164+
1. Open a dialog box in the **Dialog** editor.
165+
166+
1. Right-click anywhere in the body of the dialog box and on the shortcut menu, select **Insert ActiveX Control**.
167+
168+
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.
169+
170+
1. Select the control you want to add to your dialog box and choose **OK**.
171+
172+
The control appears in the dialog box, where you can edit it or create handlers for it just as you would any other control.
173+
174+
> [!NOTE]
175+
> You can add ActiveX controls to the **Toolbox** window for easy access.
176+
177+
#### To edit properties for an ActiveX control
178+
179+
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)).
180+
181+
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.
182+
183+
> [!NOTE]
184+
> 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.
185+
186+
1. Select the **ActiveX** control.
187+
188+
1. On the **View** menu, select **Property Page** and view the properties.
189+
190+
1. Make changes as needed in the property page.
191+
204192
## Requirements
205193

206194
Win32

0 commit comments

Comments
 (0)