Skip to content

Commit b8a3593

Browse files
authored
Merge pull request MicrosoftDocs#1691 from msebolt/resource-file-consolidation-pr10
resource file consolidation pr10
2 parents 6a82f4b + 3d01806 commit b8a3593

5 files changed

Lines changed: 65 additions & 81 deletions

‎.openpublishing.redirection.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7420,6 +7420,16 @@
74207420
"redirect_url": "/cpp/windows/aligning-groups-of-controls",
74217421
"redirect_document_id": false
74227422
},
7423+
{
7424+
"source_path": "docs/windows/adding-controls-to-a-dialog-causes-the-dialog-to-no-longer-function.md",
7425+
"redirect_url": "/cpp/windows/troubleshooting-the-dialog-editor",
7426+
"redirect_document_id": false
7427+
},
7428+
{
7429+
"source_path": "docs/windows/using-the-richedit-1-0-control-with-mfc.md",
7430+
"redirect_url": "/cpp/windows/troubleshooting-the-dialog-editor",
7431+
"redirect_document_id": false
7432+
},
74237433
{
74247434
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
74257435
"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
@@ -90,8 +90,6 @@
9090
###### [Testing a Dialog Box](testing-a-dialog-box.md)
9191
##### [Accelerator Keys for the Dialog Editor](accelerator-keys-for-the-dialog-editor.md)
9292
##### [Troubleshooting the Dialog Editor](troubleshooting-the-dialog-editor.md)
93-
###### [Adding Controls to a Dialog Causes the Dialog to No Longer Function](adding-controls-to-a-dialog-causes-the-dialog-to-no-longer-function.md)
94-
###### [Using the RichEdit 1.0 Control with MFC](using-the-richedit-1-0-control-with-mfc.md)
9593
##### [Defining Member Variables for Dialog Controls](defining-member-variables-for-dialog-controls.md)
9694
#### [Image Editor for Icons](image-editor-for-icons.md)
9795
##### [Editing Graphical Resources (Image Editor for Icons)](editing-graphical-resources-image-editor-for-icons.md)

‎docs/windows/adding-controls-to-a-dialog-causes-the-dialog-to-no-longer-function.md‎

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

‎docs/windows/troubleshooting-the-dialog-editor.md‎

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,68 @@
11
---
22
title: "Troubleshooting the Dialog Editor (C++)"
33
ms.date: "11/04/2016"
4-
helpviewer_keywords: ["controls [C++], troubleshooting", "Dialog Editor [C++], troubleshooting", "dialog boxes [C++], troubleshooting"]
4+
helpviewer_keywords: ["controls [C++], troubleshooting", "Dialog Editor [C++], troubleshooting", "dialog boxes [C++], troubleshooting", "InitCommonControls", "RichEdit 1.0 control", "rich edit controls [C++], RichEdit 1.0"]
55
ms.assetid: 21882868-5ac4-4a41-a4a6-eaaa059402ea
66
---
77
# Troubleshooting the Dialog Editor (C++)
88

9-
Below are a few issues of which you should be aware when working in the C++ **Dialog** editor.
9+
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).
1010

11-
- [Adding Controls to a Dialog Causes the Dialog to No Longer Function](../windows/adding-controls-to-a-dialog-causes-the-dialog-to-no-longer-function.md)
11+
Below are a few issues of which you should be aware when working in the C++ **Dialog** editor:
1212

13-
- [Using the RichEdit 1.0 Control with MFC](../windows/using-the-richedit-1-0-control-with-mfc.md)
13+
## Adding controls to a dialog causes the dialog to no longer function
1414

15-
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).
15+
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.
16+
17+
### Example of the problem
18+
19+
1. Create a Win32 project, modifying the application settings so you create a Windows application (not a console app).
20+
21+
1. In [Resource View](../windows/resource-view-window.md), double-click on the .rc file.
22+
23+
1. Under the dialog option, double-click the **About** box.
24+
25+
1. Add an **IP Address Control** to the dialog box.
26+
27+
1. Save and **Rebuild all**.
28+
29+
1. Execute the program.
30+
31+
1. On the dialog box's **Help** menu, click the **About** command; no dialog box is displayed.
32+
33+
### The cause
34+
35+
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.
36+
37+
||||
38+
|-|-|-|
39+
|Slider Control|Tree Control|Date Time Picker|
40+
|Spin Control|Tab Control|Month Calendar|
41+
|Progress Control|Animation Control|IP Address Control|
42+
|Hot Key|Rich Edit Control|Extended Combo Box|
43+
|List Control|Rich Edit 2.0 Control|Custom Control|
44+
45+
### Fix for common controls
46+
47+
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.
48+
49+
### Fix for RichEdit controls
50+
51+
You must call `LoadLibrary` for rich edit controls. 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).
52+
53+
### Requirements
54+
55+
Win32
56+
57+
## Using the RichEdit 1.0 Control with MFC
58+
59+
To use a RichEdit control, 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).
60+
61+
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.
62+
63+
### Requirements
64+
65+
MFC
1666

1767
## See Also
1868

‎docs/windows/using-the-richedit-1-0-control-with-mfc.md‎

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

0 commit comments

Comments
 (0)