Skip to content

Commit b18151f

Browse files
author
msebolt
committed
revision to include additional article
1 parent 4a4652e commit b18151f

4 files changed

Lines changed: 27 additions & 45 deletions

File tree

‎.openpublishing.redirection.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7355,6 +7355,11 @@
73557355
"redirect_url": "/cpp/windows/adding-a-control-to-a-dialog-box",
73567356
"redirect_document_id": false
73577357
},
7358+
{
7359+
"source_path": "docs/windows/sizing-a-control-while-you-add-it.md",
7360+
"redirect_url": "/cpp/windows/adding-a-control-to-a-dialog-box",
7361+
"redirect_document_id": false
7362+
},
73587363
{
73597364
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
73607365
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

‎docs/windows/TOC.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +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-
####### [Sizing a Control While You Add It](sizing-a-control-while-you-add-it.md)
7170
####### [Editing Control Properties](editing-control-properties.md)
7271
####### [Deleting a Control](deleting-a-control.md)
7372
####### [Viewing and Adding ActiveX Controls to a Dialog Box](viewing-and-adding-activex-controls-to-a-dialog-box.md)

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

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
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", "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"]
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", "dialog box controls [C++], size", "controls [C++], sizing"]
66
ms.assetid: b2a26d19-093f-49ca-93da-fef00dfbb381
77
---
88
# Adding a Control to a Dialog Box (C++)
99

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.
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. You can then move the controls around or change their size and shape.
1111

1212
The standard controls available in the **Toolbox** are:
1313

@@ -75,13 +75,13 @@ For information on adding resources to managed projects, see [Resources in Deskt
7575

7676
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**.
7777

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:
78+
1. On the **Dialog Editor** tab of the [Toolbox Window](/visualstudio/ide/reference/toolbox), select the control you want, then:
7979

80-
- 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).
80+
- Select the dialog box at the location where you want to place the control. The control appears where you've selected.
8181

8282
\- or -
8383

84-
- Drag and drop the control from the **Toolbox** window to the location on your dialog box. For more information, see [Sizing a Control While You Add It](../windows/sizing-a-control-while-you-add-it.md).
84+
- Drag and drop the control from the **Toolbox** window to the location on your dialog box.
8585

8686
\- or -
8787

@@ -95,6 +95,22 @@ For information on adding resources to managed projects, see [Resources in Deskt
9595

9696
1. Press **Esc** to stop placing controls.
9797

98+
## To size a control while you add it
99+
100+
1. Select a control in the [Toolbox Window](/visualstudio/ide/reference/toolbox).
101+
102+
1. Place your cursor (which appears as cross hairs) where you want the upper-left corner of the new control to be on your dialog box.
103+
104+
1. Select and hold down the mouse button to anchor the upper-left corner of your control on the dialog box, then drag the cursor to the right and down until the control is the size you want.
105+
106+
> [!NOTE]
107+
> You can actually anchor any of the four corners of the control you're drawing. This procedure used the upper-left corner as an example.
108+
109+
1. Release the mouse button. The control settles onto the dialog box in the size you specified.
110+
111+
> [!TIP]
112+
> 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).
113+
98114
## Requirements
99115

100116
Win32
@@ -103,10 +119,7 @@ Win32
103119

104120
[Controls in Dialog Boxes](../windows/controls-in-dialog-boxes.md)<br/>
105121
[Adding Event Handlers for Dialog Box Controls](../windows/adding-event-handlers-for-dialog-box-controls.md)<br/>
106-
[Dialog Box Controls and Variable Types](../ide/dialog-box-controls-and-variable-types.md)
107-
108-
## See Also
109-
122+
[Dialog Box Controls and Variable Types](../ide/dialog-box-controls-and-variable-types.md)<br/>
110123
[Controls](../mfc/controls-mfc.md)<br/>
111124
[Control Classes](../mfc/control-classes.md)<br/>
112125
[Dialog Box Classes](../mfc/dialog-box-classes.md)<br/>

‎docs/windows/sizing-a-control-while-you-add-it.md‎

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

0 commit comments

Comments
 (0)