Skip to content

Commit d66d299

Browse files
authored
Merge pull request #1765 from msebolt/resource-file-consolidation-pr56
resource file consolidation pr56
2 parents b30fd30 + 15b94e1 commit d66d299

13 files changed

Lines changed: 394 additions & 517 deletions

‎.openpublishing.redirection.json‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8030,6 +8030,36 @@
80308030
"redirect_url": "/cpp/windows/dialog-editor",
80318031
"redirect_document_id": false
80328032
},
8033+
{
8034+
"source_path": "docs/windows/testing-a-dialog-box.md",
8035+
"redirect_url": "/cpp/windows/creating-a-new-dialog-box",
8036+
"redirect_document_id": false
8037+
},
8038+
{
8039+
"source_path": "docs/windows/custom-controls-in-the-dialog-editor.md",
8040+
"redirect_url": "/cpp/windows/controls-in-dialog-boxes",
8041+
"redirect_document_id": false
8042+
},
8043+
{
8044+
"source_path": "docs/windows/troubleshooting-the-dialog-editor.md",
8045+
"redirect_url": "/cpp/windows/adding-editing-or-deleting-controls",
8046+
"redirect_document_id": false
8047+
},
8048+
{
8049+
"source_path": "docs/windows/adding-values-to-a-combo-box-control.md",
8050+
"redirect_url": "/cpp/windows/defining-mnemonics-access-keys",
8051+
"redirect_document_id": false
8052+
},
8053+
{
8054+
"source_path": "docs/windows/selecting-controls.md",
8055+
"redirect_url": "/cpp/windows/arrangement-of-controls-on-dialog-boxes",
8056+
"redirect_document_id": false
8057+
},
8058+
{
8059+
"source_path": "docs/windows/sizing-individual-controls.md",
8060+
"redirect_url": "/cpp/windows/arrangement-of-controls-on-dialog-boxes",
8061+
"redirect_document_id": false
8062+
},
80338063
{
80348064
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
80358065
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

‎docs/windows/TOC.md‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,8 @@
2828
##### [Creating a Dialog Box](creating-a-new-dialog-box.md)
2929
##### [Controls in Dialog Boxes](controls-in-dialog-boxes.md)
3030
###### [Adding, Editing, or Deleting Controls](adding-editing-or-deleting-controls.md)
31-
###### [Selecting Controls](selecting-controls.md)
32-
###### [Sizing Controls](sizing-individual-controls.md)
33-
###### [Adding Values to a Combo Box Control](adding-values-to-a-combo-box-control.md)
3431
###### [Arrangement of Controls on Dialog Boxes](arrangement-of-controls-on-dialog-boxes.md)
35-
###### [Custom Controls in the Dialog Editor](custom-controls-in-the-dialog-editor.md)
36-
###### [Defining Mnemonics (Access Keys)](defining-mnemonics-access-keys.md)
37-
###### [Designing a Dialog Box](testing-a-dialog-box.md)
38-
##### [Troubleshooting the Dialog Editor](troubleshooting-the-dialog-editor.md)
39-
##### [Defining Member Variables for Dialog Controls](defining-member-variables-for-dialog-controls.md)
32+
###### [Defining Control Access and Values](defining-mnemonics-access-keys.md)
4033
#### [Image Editor for Icons](image-editor-for-icons.md)
4134
##### [Editing Graphical Resources (Image Editor for Icons)](editing-graphical-resources-image-editor-for-icons.md)
4235
###### [Creating an Icon or Other Image (Image Editor for Icons)](creating-an-icon-or-other-image-image-editor-for-icons.md)

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

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Adding, Editing, or Deleting Controls"
33
ms.date: "11/04/2016"
44
f1_keywords: ["vc.editors.dialog.dialog", "vc.controls.activex", "vc.editors.dialog.insertActiveXControls"]
5-
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"]
5+
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
---
88
# Adding, Editing, or Deleting Controls
@@ -13,44 +13,6 @@ The **Dialog Editor** tab appears in the [Toolbox window](/visualstudio/ide/refe
1313

1414
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.
1515

16-
The standard controls available in the **Toolbox** with default events are:
17-
18-
|Control name|Default event|
19-
|---|---|
20-
|[Button control](../mfc/reference/cbutton-class.md)|BN_CLICKED|
21-
|[Check Box control](../mfc/reference/styles-used-by-mfc.md#button-styles)|BN_CLICKED|
22-
|[Combo Box control](../mfc/reference/ccombobox-class.md)|CBN_SELCHANGE|
23-
|[Edit control](../mfc/reference/cedit-class.md)|EN_CHANGE|
24-
|Group box|(Not applicable)|
25-
|[List Box control](../mfc/reference/clistbox-class.md)|LBN_SELCHANGE|
26-
|[Radio Button control](../mfc/reference/styles-used-by-mfc.md#button-styles)|BN_CLICKED|
27-
|[Static Text control](../mfc/reference/cstatic-class.md)|(Not applicable)|
28-
|[Picture control](../mfc/reference/cpictureholder-class.md)|(Not applicable)|
29-
|[Rich Edit 2.0 control](../mfc/using-cricheditctrl.md)|EN_CHANGE|
30-
|[Scroll bar control](../mfc/reference/cscrollbar-class.md)|NM_THEMECHANGED|
31-
32-
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) and [Rich Edit Control Examples](../mfc/rich-edit-control-examples.md).
33-
34-
The [Windows Common Controls](../mfc/controls-mfc.md) available in the **Toolbox** provide increased functionality in your application. They include:
35-
36-
|Control name|Default event|
37-
|---|---|
38-
|[Slider control](../mfc/slider-control-styles.md)|NM_CUSTOMDRAW|
39-
|[Spin control](../mfc/using-cspinbuttonctrl.md)|UDN_DELTAPOS|
40-
|[Progress control](../mfc/styles-for-the-progress-control.md)|NM_CUSTOMDRAW|
41-
|[Hot Key control](../mfc/using-a-hot-key-control.md)|NM_OUTOFMEMORY|
42-
|[List control](../mfc/list-control-and-list-view.md)|LVN_ITEMCHANGE|
43-
|[Tree control](../mfc/tree-control-styles.md)|TVN_SELCHANGE|
44-
|[Tab control](../mfc/tab-controls-and-property-sheets.md)|TCN_SELCHANGE|
45-
|[Animation control](../mfc/using-an-animation-control.md)|ACN_START|
46-
|[Date Time Picker control](../mfc/creating-the-date-and-time-picker-control.md)|DTN_DATETIMECHANGE|
47-
|[Month Calendar control](../mfc/month-calendar-control-examples.md)|MCN_SELCHANGE|
48-
|[IP Address control](../mfc/reference/cipaddressctrl-class.md)|IPN_FIELDCHANGED|
49-
|[Extended Combo Box control](../mfc/creating-an-extended-combo-box-control.md)||
50-
|[Custom control](custom-controls-in-the-dialog-editor.md)|TTN_GETDISPINFO|
51-
52-
For more information, see [Control Classes](../mfc/control-classes.md), [Dialog Box Classes](../mfc/dialog-box-classes.md), and [Scroll-Bar Styles](../mfc/reference/styles-used-by-mfc.md#scroll-bar-styles).
53-
5416
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).
5517

5618
## To add a control
@@ -200,14 +162,53 @@ On the **Edit** menu, select **Delete**.
200162
> [!TIP]
201163
> While using the **Dialog** editor, in many instances, you can click the right mouse button to display a shortcut menu of frequently used commands.
202164
165+
## Known issue
166+
167+
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.
168+
169+
To see an example of the problem:
170+
171+
1. Create a Win32 project, modifying the application settings so you create a Windows application (not a console app).
172+
173+
1. In [Resource View](../windows/resource-view-window.md), double-click on the .rc file.
174+
175+
1. Under the dialog option, double-click the **About** box.
176+
177+
1. Add an **IP Address Control** to the dialog box.
178+
179+
1. Save and **Rebuild all**.
180+
181+
1. Execute the program.
182+
183+
1. On the dialog box's **Help** menu, click the **About** command; no dialog box is displayed.
184+
185+
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.
186+
187+
||||
188+
|-|-|-|
189+
|Slider Control|Tree Control|Date Time Picker|
190+
|Spin Control|Tab Control|Month Calendar|
191+
|Progress Control|Animation Control|IP Address Control|
192+
|Hot Key|Rich Edit Control|Extended Combo Box|
193+
|List Control|Rich Edit 2.0 Control|Custom Control|
194+
195+
To use common controls on a dialog box, you need to call [InitCommonControlsEx](/windows/desktop/api/commctrl/nf-commctrl-initcommoncontrolsex) or `AFXInitCommonControls` before you create the dialog box.
196+
197+
To use RichEdit controls, you must call `LoadLibrary`. For more information, see [About Rich Edit Controls](/windows/desktop/Controls/about-rich-edit-controls) in the Windows SDK and [Overview of the Rich Edit Control](../mfc/overview-of-the-rich-edit-control.md).
198+
199+
> [!NOTE]
200+
> To use a RichEdit control with MFC, you must first call [AfxInitRichEdit2](../mfc/reference/application-information-and-management.md#afxinitrichedit2) to load the RichEdit 2.0 Control (RICHED20.DLL), or call [AfxInitRichEdit](../mfc/reference/application-information-and-management.md#afxinitrichedit) to load the older RichEdit 1.0 Control (RICHED32.DLL).
201+
>
202+
> 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.
203+
203204
## Requirements
204205

205206
Win32
206207

207208
## See also
208209

210+
[Dialog Editor](../windows/dialog-editor.md)<br/>
209211
[Controls in Dialog Boxes](controls-in-dialog-boxes.md)<br/>
210-
[Dialog Box Controls and Variable Types](../ide/dialog-box-controls-and-variable-types.md)<br/>
211212
[Resource Files](../windows/resource-files-visual-studio.md)<br/>
212213

213214
<!-- excluded links
@@ -219,4 +220,4 @@ Win32
219220
[Overriding a Virtual Function](../ide/overriding-a-virtual-function-visual-cpp.md)<br/>
220221
[MFC Message Handler](../mfc/reference/adding-an-mfc-message-handler.md)
221222
[Declaring a Variable Based on Your New Control Class](../mfc/reference/declaring-a-variable-based-on-your-new-control-class.md)<br/>
222-
-->
223+
-->

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

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

0 commit comments

Comments
 (0)