Skip to content

Commit 4a4652e

Browse files
author
msebolt
committed
resource file consolidation pr5
1 parent a86a2ae commit 4a4652e

5 files changed

Lines changed: 93 additions & 121 deletions

File tree

‎.openpublishing.redirection.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7345,6 +7345,16 @@
73457345
"redirect_url": "/cpp/windows/binary-editor",
73467346
"redirect_document_id": false
73477347
},
7348+
{
7349+
"source_path": "docs/windows/adding-multiple-controls.md",
7350+
"redirect_url": "/cpp/windows/adding-a-control-to-a-dialog-box",
7351+
"redirect_document_id": false
7352+
},
7353+
{
7354+
"source_path": "docs/windows/dialog-editor-tab-toolbox.md",
7355+
"redirect_url": "/cpp/windows/adding-a-control-to-a-dialog-box",
7356+
"redirect_document_id": false
7357+
},
73487358
{
73497359
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
73507360
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

‎docs/windows/TOC.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
##### [Controls in Dialog Boxes](controls-in-dialog-boxes.md)
6868
###### [Adding, Editing, or Deleting Controls](adding-editing-or-deleting-controls.md)
6969
####### [Adding a Control to a Dialog Box](adding-a-control-to-a-dialog-box.md)
70-
######## [Dialog Editor Tab, Toolbox](dialog-editor-tab-toolbox.md)
71-
####### [Adding Multiple Controls](adding-multiple-controls.md)
7270
####### [Sizing a Control While You Add It](sizing-a-control-while-you-add-it.md)
7371
####### [Editing Control Properties](editing-control-properties.md)
7472
####### [Deleting a Control](deleting-a-control.md)

‎docs/windows/adding-a-control-to-a-dialog-box.md‎

Lines changed: 83 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,80 @@
22
title: "Adding a Control to a Dialog Box (C++)"
33
ms.date: "11/04/2016"
44
f1_keywords: ["vc.editors.dialog.dialog"]
5-
helpviewer_keywords: ["dialog boxes [C++], adding controls to"]
5+
helpviewer_keywords: ["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"]
66
ms.assetid: b2a26d19-093f-49ca-93da-fef00dfbb381
77
---
88
# Adding a Control to a Dialog Box (C++)
99

10-
### To add a control to a dialog box
10+
The **Dialog Editor** tab appears in the [Toolbox window](/visualstudio/ide/reference/toolbox) when you're working in the **Dialog** editor. To add controls to your new dialog box, drag controls from the **Toolbox** to the dialog box you're creating (for more information, see [Adding a Control to a Dialog Box](adding-a-control-to-a-dialog-box.md)). You can then move the controls around or change their size and shape.
1111

12-
1. Ensure that the dialog box tabbed window is the current document in the editor frame. If a dialog is not the current document, you won't see the **Dialog Editor Tab** in the **Toolbox**.
12+
The standard controls available in the **Toolbox** are:
1313

14-
2. On the [Dialog Editor Tab](../windows/dialog-editor-tab-toolbox.md) of the [Toolbox Window](/visualstudio/ide/reference/toolbox), select the control you want, then:
14+
- [Button control](../mfc/reference/cbutton-class.md)
15+
16+
- [Check Box control](../mfc/reference/styles-used-by-mfc.md#button-styles)
17+
18+
- [Combo Box control](../mfc/reference/ccombobox-class.md)
19+
20+
- [Edit control](../mfc/reference/cedit-class.md)
21+
22+
- Group box
23+
24+
- [List Box control](../mfc/reference/clistbox-class.md)
25+
26+
- [Radio Button control](../mfc/reference/styles-used-by-mfc.md#button-styles)
27+
28+
- [Static Text control](../mfc/reference/cstatic-class.md)
29+
30+
- [Picture control](../mfc/reference/cpictureholder-class.md)
31+
32+
- [Rich Edit 2.0 control](../mfc/using-cricheditctrl.md)
33+
34+
- [Scroll bar control](../mfc/reference/cscrollbar-class.md)
35+
36+
The [Windows Common Controls](../mfc/controls-mfc.md) available in the **Toolbox** provide increased functionality in your application. They include:
37+
38+
- [Slider control](../mfc/slider-control-styles.md)
39+
40+
- [Spin control](../mfc/using-cspinbuttonctrl.md)
41+
42+
- [Progress control](../mfc/styles-for-the-progress-control.md)
43+
44+
- [Hot Key control](../mfc/using-a-hot-key-control.md)
45+
46+
- [List control](../mfc/list-control-and-list-view.md)
47+
48+
- [Tree control](../mfc/tree-control-styles.md)
49+
50+
- [Tab control](../mfc/tab-controls-and-property-sheets.md)
51+
52+
- [Animation control](../mfc/using-an-animation-control.md)
53+
54+
- [Date Time Picker control](../mfc/creating-the-date-and-time-picker-control.md)
55+
56+
- [Month Calendar control](../mfc/month-calendar-control-examples.md)
57+
58+
- [IP Address control](../mfc/reference/cipaddressctrl-class.md)
59+
60+
- [Extended Combo Box control](../mfc/creating-an-extended-combo-box-control.md)
61+
62+
- [Custom control](custom-controls-in-the-dialog-editor.md)
63+
64+
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 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).
65+
66+
You may also [add ActiveX controls to your dialog box](../windows/viewing-and-adding-activex-controls-to-a-dialog-box.md).
67+
68+
You can also customize the **Toolbox** window for easier use. For more information, see [Using the Toolbox](/visualstudio/ide/using-the-toolbox).
69+
70+
For more information on using the **RichEdit 1.0** control with MFC, see [Using the RichEdit 1.0 Control with MFC](../windows/using-the-richedit-1-0-control-with-mfc.md)
71+
72+
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).
73+
74+
## To add a control to a dialog box
75+
76+
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**.
77+
78+
1. On the [Dialog Editor Tab](../windows/dialog-editor-tab-toolbox.md) of the [Toolbox Window](/visualstudio/ide/reference/toolbox), select the control you want, then:
1579

1680
- Click the dialog box at the location where you want to place the control. The control appears where you've clicked. For information, see [Adding Multiple Controls](../windows/adding-multiple-controls.md).
1781

@@ -23,9 +87,13 @@ ms.assetid: b2a26d19-093f-49ca-93da-fef00dfbb381
2387

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

26-
For information about the types of controls available on the **Toolbox** window, see [Dialog Editor Tab, Toolbox Window](../windows/dialog-editor-tab-toolbox.md).
90+
## To add multiple controls
91+
92+
1. While holding down the **Ctrl** key, select a control in the [Toolbox Window](/visualstudio/ide/reference/toolbox).
2793

28-
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).
94+
1. Release the **Ctrl** key and select the dialog box as many times as you want to add the particular control.
95+
96+
1. Press **Esc** to stop placing controls.
2997

3098
## Requirements
3199

@@ -35,4 +103,12 @@ Win32
35103

36104
[Controls in Dialog Boxes](../windows/controls-in-dialog-boxes.md)<br/>
37105
[Adding Event Handlers for Dialog Box Controls](../windows/adding-event-handlers-for-dialog-box-controls.md)<br/>
38-
[Dialog Box Controls and Variable Types](../ide/dialog-box-controls-and-variable-types.md)
106+
[Dialog Box Controls and Variable Types](../ide/dialog-box-controls-and-variable-types.md)
107+
108+
## See Also
109+
110+
[Controls](../mfc/controls-mfc.md)<br/>
111+
[Control Classes](../mfc/control-classes.md)<br/>
112+
[Dialog Box Classes](../mfc/dialog-box-classes.md)<br/>
113+
[Scroll-Bar Styles](../mfc/reference/styles-used-by-mfc.md#scroll-bar-styles)<br/>
114+
[Rich Edit Control Examples](../mfc/rich-edit-control-examples.md)<br/>

‎docs/windows/adding-multiple-controls.md‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎docs/windows/dialog-editor-tab-toolbox.md‎

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)