Skip to content

Commit 9fd9741

Browse files
authored
Merge pull request MicrosoftDocs#1716 from msebolt/resource-file-consolidation-pr29
resource file consolidation pr29
2 parents 51ef102 + 7f03c53 commit 9fd9741

8 files changed

+103
-154
lines changed

.openpublishing.redirection.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7695,6 +7695,26 @@
76957695
"redirect_url": "/cpp/windows/adding-editing-or-deleting-controls",
76967696
"redirect_document_id": false
76977697
},
7698+
{
7699+
"source_path": "docs/windows/specifying-the-location-and-size-of-a-dialog-box.md",
7700+
"redirect_url": "/cpp/windows/testing-a-dialog-box",
7701+
"redirect_document_id": false
7702+
},
7703+
{
7704+
"source_path": "docs/windows/making-controls-the-same-width-height-or-size.md",
7705+
"redirect_url": "/cpp/windows/sizing-individual-controls",
7706+
"redirect_document_id": false
7707+
},
7708+
{
7709+
"source_path": "docs/windows/setting-the-size-of-the-combo-box-and-its-drop-down-list.md",
7710+
"redirect_url": "/cpp/windows/sizing-individual-controls",
7711+
"redirect_document_id": false
7712+
},
7713+
{
7714+
"source_path": "docs/windows/setting-the-width-of-a-horizontal-scroll-bar.md",
7715+
"redirect_url": "/cpp/windows/sizing-individual-controls",
7716+
"redirect_document_id": false
7717+
},
76987718
{
76997719
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
77007720
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

docs/windows/TOC.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,16 @@
6565
##### [Controls in Dialog Boxes](controls-in-dialog-boxes.md)
6666
###### [Adding, Editing, or Deleting Controls](adding-editing-or-deleting-controls.md)
6767
###### [Selecting Controls](selecting-controls.md)
68-
###### [Sizing Individual Controls](sizing-individual-controls.md)
69-
###### [Making Controls the Same Width, Height, or Size](making-controls-the-same-width-height-or-size.md)
70-
###### [Setting the Size of the Combo Box and Its Drop-Down List](setting-the-size-of-the-combo-box-and-its-drop-down-list.md)
68+
###### [Sizing Controls](sizing-individual-controls.md)
7169
###### [Adding Values to a Combo Box Control](adding-values-to-a-combo-box-control.md)
72-
###### [Setting the Width of a Horizontal Scroll Bar](setting-the-width-of-a-horizontal-scroll-bar.md)
7370
###### [Arrangement of Controls on Dialog Boxes](arrangement-of-controls-on-dialog-boxes.md)
7471
####### [Dialog Editor States (Guides and Grids)](dialog-editor-states-guides-and-grids.md)
7572
####### [Grouping Radio Buttons on a Dialog Box](grouping-radio-buttons-on-a-dialog-box.md)
7673
####### [Align Controls](aligning-groups-of-controls.md)
7774
####### [Changing the Tab Order of Controls](changing-the-tab-order-of-controls.md)
7875
###### [Custom Controls in the Dialog Editor](custom-controls-in-the-dialog-editor.md)
7976
###### [Defining Mnemonics (Access Keys)](defining-mnemonics-access-keys.md)
80-
###### [Specifying the Location and Size of a Dialog Box](specifying-the-location-and-size-of-a-dialog-box.md)
81-
###### [Testing a Dialog Box](testing-a-dialog-box.md)
77+
###### [Designing a Dialog Box](testing-a-dialog-box.md)
8278
##### [Accelerator Keys for the Dialog Editor](accelerator-keys-for-the-dialog-editor.md)
8379
##### [Troubleshooting the Dialog Editor](troubleshooting-the-dialog-editor.md)
8480
##### [Defining Member Variables for Dialog Controls](defining-member-variables-for-dialog-controls.md)

docs/windows/making-controls-the-same-width-height-or-size.md

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

docs/windows/setting-the-size-of-the-combo-box-and-its-drop-down-list.md

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

docs/windows/setting-the-width-of-a-horizontal-scroll-bar.md

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 67 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
title: "Sizing Individual Controls"
2+
title: "Sizing Controls"
33
ms.date: "11/04/2016"
4-
helpviewer_keywords: ["Size to Content command", "size, controls", "text, autosizing controls to fit text", "controls [C++], sizing"]
4+
f1_keywords: ["vc.editors.dialog.combo"]
5+
helpviewer_keywords: ["Size to Content command", "size, controls", "text, autosizing controls to fit text", "controls [C++], sizing", "Make Same Size command", "combo boxes, sizing", "list controls [C++], scroll bar width", "CListBox::SetHorizontalExtent", "controls [C++], scroll bar", "scroll bars [C++], displaying in controls", "horizontal scroll bar width", "CListBox class, scroll bar width", "scroll bars [C++], width"]
56
ms.assetid: 14ccba02-7171-463a-a121-7018cf1e2e5a
67
---
7-
# Sizing Individual Controls
8+
# Sizing Controls
89

9-
Use the sizing handles to resize a control. When the pointer is positioned on a sizing handle, it changes shape to indicate the directions in which the control can be resized. Active sizing handles are solid; if a sizing handle is hollow, the control cannot be resized along that axis.
10+
Use the sizing handles to resize a control. When the pointer is positioned on a sizing handle, it changes shape to indicate the directions in which the control can be resized. Active sizing handles are solid; if a sizing handle is hollow, the control can't be resized along that axis.
1011

1112
You can also change the size of a control by snapping the control to guides or margins, or by moving one snapped control and guide away from another.
1213

13-
### To size a control
14+
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).
15+
16+
## To size an individual control
1417

1518
1. Select the control.
1619

17-
2. Drag the sizing handles to change the size of the control:
20+
1. Drag the sizing handles to change the size of the control:
1821

1922
- Sizing handles at the top and sides change the horizontal or vertical size.
2023

@@ -23,21 +26,73 @@ You can also change the size of a control by snapping the control to guides or m
2326
> [!TIP]
2427
> You can resize the control one dialog unit (DLU) at a time by holding down the **Shift** key and using the **Right Arrow** and **Down Arrow** keys.
2528
26-
### To automatically size a control to fit the text within it
29+
## To automatically size a control to fit the text within it
2730

28-
1. Choose **Size to Content** from the **Format** menu.
31+
Choose **Size to Content** from the **Format** menu.
2932

3033
\- or -
3134

32-
- Right-click the control and choose **Size to Content** from the shortcut menu.
35+
Right-click the control and choose **Size to Content** from the shortcut menu.
36+
37+
## To make controls the same width, height, or size
38+
39+
You can resize a group of controls based on the size of the dominant control.
40+
41+
1. [Select the controls](../windows/selecting-multiple-controls.md) you want to resize.
42+
43+
The control selected first in the series is the dominant control. The final size of the controls in the group depends on the size of the dominant control. For more information on selecting the dominant control, see [Specifying a Dominant Control](../windows/specifying-the-dominant-control.md).
44+
45+
1. From the **Format** menu, choose **Make Same Size**, then choose one of the following commands:
46+
47+
- **Both**
48+
49+
- **Height**
50+
51+
- **Width**
52+
53+
## To set the size of the combo box and its drop-down list
54+
55+
You can size a combo box when you add it to the dialog box. You can also specify the size of the drop-down list box. For more information, see [Adding Values to a Combo Box Control](../windows/adding-values-to-a-combo-box-control.md).
56+
57+
### To size a combo box
58+
59+
1. Select the combo-box control in your dialog box.
60+
61+
Initially, only the right and left sizing handles are active.
62+
63+
1. Use the sizing handles to set the width of the combo box.
64+
65+
You can also set the vertical size of the drop-down portion of the combo box.
66+
67+
### To set the size of the combo box drop-down list
68+
69+
1. Select the drop-down arrow button at the right of the combo box.
70+
71+
![Arrow on a combo box in an MFC project](../mfc/media/vccomboboxarrow.gif "vcComboBoxArrow")
72+
73+
The outline of the control changes to show the size of the combo box with the drop-down list area extended.
74+
75+
1. Use the lower sizing handle to change the initial size of the drop-down list area.
76+
77+
![Combo-box sizing in an MFC project](../mfc/media/vccomboboxsizing.gif "vcComboBoxSizing")
78+
79+
1. Select the drop-down arrow again to close the drop-down list portion of the combo box.
80+
81+
## To set the width of a horizontal scroll bar and make it appear
82+
83+
When you add a list box with a horizontal scroll bar to a dialog box using MFC classes, the scroll bar won't automatically appear in your application.
84+
85+
Set a maximum width for the widest element by calling [CListBox::SetHorizontalExtent](../mfc/reference/clistbox-class.md#sethorizontalextent) in your code.
3386

34-
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).
87+
Without this value set, the scroll bar won't appear, even when the items in the list box are wider than the box.
88+
> [!NOTE]
89+
> The horizontal scroll bar requires MFC.
3590
3691
## Requirements
3792

3893
Win32
3994

40-
## See Also
95+
## See also
4196

4297
[Controls in Dialog Boxes](../windows/controls-in-dialog-boxes.md)<br/>
43-
[Controls](../mfc/controls-mfc.md)
98+
[Controls](../mfc/controls-mfc.md)

docs/windows/specifying-the-location-and-size-of-a-dialog-box.md

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

0 commit comments

Comments
 (0)