Skip to content

Fix git push error for protected CLA branch #822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions docs/windows/atl-predefined-symbols.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ ms.assetid: 60d8f4e6-6ed9-47f3-9051-e4bf34384456
---
# ATL Predefined Symbols

These symbols are defined in the ATL header files, but they support standard Windows application functions and actions. These symbols are mainly used with dialog boxes. When you are working with dialogs and controls in the [Dialog editor](../windows/dialog-editor.md), these symbols will appear in the **Properties** window associated with common controls. For instance, if your dialog box has a **Cancel** button, that command will be associated with the symbol IDCANCEL in the [Properties Window](/visualstudio/ide/reference/properties-window).
These symbols are defined in the ATL header files, but they support standard Windows application functions and actions. These symbols are mainly used with dialog boxes.

When you are working with dialogs and controls in the [Dialog editor](../windows/dialog-editor.md), these symbols will appear in the **Properties** window associated with common controls. For instance, if your dialog box has a **Cancel** button, that command will be associated with the symbol IDCANCEL in the [Properties Window](/visualstudio/ide/reference/properties-window).

|||
|-|-|
|IDABORT|Control: Dialog box Abort button|
|IDC_STATIC|Control: Static control|
|IDCANCEL|Control: Dialog box Cancel button|
|IDIGNORE|Control: Dialog box Ignore button|
|IDNO|Control: Dialog box No button|
|IDOK|Control: Dialog box OK button|
|IDR_ACCELERATOR1|Resource: Accelerator table|
|IDRETRY|Control: Dialog box Retry button|
|IDS_PROJNAME|String: Current application name|
|IDYES|Control: Dialog box Yes button|
|IDABORT|(control) Dialog box, Abort button|
|IDC_STATIC|(control) Static control|
|IDCANCEL|(control) Dialog box, Cancel button|
|IDIGNORE|(control) Dialog box, Ignore button|
|IDNO|(control) Dialog box, No button|
|IDOK|(control) Dialog box, OK button|
|IDR_ACCELERATOR1|(resource) Accelerator table|
|IDRETRY|(control) Dialog box, Retry button|
|IDS_PROJNAME|(string) Current application name|
|IDYES|(control) Dialog box, Yes button|

## Requirements

Expand Down
37 changes: 18 additions & 19 deletions docs/windows/changing-a-symbol-or-symbol-name-id.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ ms.assetid: 26541832-8dba-4177-b642-e08f94502ea7
---
# How to: Manage Symbols

When you create a new resource or resource object, the development environment assigns it a default symbol name, for example, IDD_DIALOG1. You can use the [Properties Window](/visualstudio/ide/reference/properties-window) to change the default symbol name or to change the name of any symbol already associated with a resource.
When you create a new resource or resource object, the development environment assigns it a default symbol name, for example, `IDD_DIALOG1`. You can use the [Properties Window](/visualstudio/ide/reference/properties-window) to change the default symbol name or to change the name of any symbol already associated with a resource.

For symbols associated with a single resource, you can also use the **Properties** window to change the symbol value. You can use the [Resource Symbols dialog box](../windows/resource-symbols-dialog-box.md) to change the value of symbols not currently assigned to a resource.

Normally all symbol definitions are saved in `Resource.h`. However, you may need to change this include filename so that you can, for example, work with more than one resource file in the same directory.

> [!NOTE]
> If your project doesn't already contain an .rc file, see [Creating a New Resource Script File](../windows/how-to-create-a-resource-script-file.md).
> If your project doesn't already contain an .rc file, see [How to: Create Resources](../windows/how-to-create-a-resource-script-file.md).

## Symbol Name Restrictions

Expand All @@ -30,14 +30,14 @@ The restrictions on symbol names are as follows:

- Symbol names aren't case-sensitive, but the case of the first symbol definition is preserved. The header file that defines the symbols is used by both the resource compiler/editor and C++ program(s) to refer resources defined in a resource file. For two symbol names that differ only in case, the C++ program will see two separate symbols while the resource compiler/editor will see both names as referring to one single symbol.

> [!NOTE]
> If you do not follow the standard symbol name scheme (ID*_[keyword]) outlined below, and your symbol name happens to be the same as a keyword known to the resource script compiler, trying to build the resource script file will result in seemingly random error generation that is difficult to diagnose. To prevent this, adhere to the standard naming scheme.
> [!NOTE]
> If you don't follow the standard symbol name scheme (ID*_[keyword]) outlined below and your symbol name happens to be the same as a keyword known to the resource script compiler, trying to build the resource script file will result in seemingly random error generation that is difficult to diagnose. To prevent this, adhere to the standard naming scheme.

Symbol names have descriptive prefixes that indicate the kind of resource or object they represent. These descriptive prefixes begin with the text combination ID. The Microsoft Foundation Class Library (MFC) uses the symbol naming conventions shown in the following table.
Symbol names have descriptive prefixes that indicate the kind of resource or object they represent. These descriptive prefixes begin with the text combination ID. The Microsoft Foundation Class library (MFC) uses the symbol naming conventions shown in the following table:

|Category|Prefix|Use|
|--------------|------------|---------|
|Resources|IDR_ IDD_ IDC_ IDI_ IDB_|Accelerator or menu (and associated or custom resources) Dialog box Cursor Icon Bitmap|
|Resources|IDR_, IDD_, IDC_, IDI_, IDB_|Accelerator or menu (and associated or custom resources), dialog box, cursor, icon, bitmap|
|Menu items|ID_|Menu item|
|Commands|ID_|Command|
|Controls and child windows|IDC_|Control|
Expand All @@ -52,11 +52,12 @@ Symbol names have descriptive prefixes that indicate the kind of resource or obj

If you type a new symbol name, it's automatically assigned a value.

You can use the [Resource Symbols dialog box](../windows/resource-symbols-dialog-box.md) to change the names of symbols not currently assigned to a resource.
> [!NOTE]
> You can use the [Resource Symbols dialog box](../windows/resource-symbols-dialog-box.md) to change the names of symbols not currently assigned to a resource.

## Symbol Value Restrictions

A symbol value can be any integer expressed in the normal manner for #define preprocessor directives. Here are some examples of symbol values:
A symbol value can be any integer expressed in the normal manner for `#define` preprocessor directives. Here are some examples of symbol values:

```
18
Expand All @@ -79,15 +80,13 @@ Here are some limitations of symbol values:
#define IDC_MYEDIT IDC_OTHEREDIT //not supported
```

- You can't use preprocessor macros with arguments as value definitions. For example:
- You can't use preprocessor macros with arguments as value definitions. The following example isn't a valid expression regardless of what `ID` evaluates to at compile time:

```cpp
#define IDD_ABOUT ID(7) //not supported
```

isn't a valid expression regardless of what `ID` evaluates to at compile time.

- Your application may have an existing file containing symbols defined with expressions. For more information on how to include the symbols as read-only symbols, see [Using Shared (Read Only) or Calculated Symbols](../windows/including-shared-read-only-or-calculated-symbols.md).
- Your application may have an existing file containing symbols defined with expressions.

For more information on number ranges, see [TN023: Standard MFC Resources](../mfc/tn023-standard-mfc-resources.md).

Expand All @@ -101,7 +100,7 @@ For more information on number ranges, see [TN023: Standard MFC Resources](../mf
IDC_EDITNAME=5100
```

The new value is stored in the symbol header file the next time you save the project. Only the symbol name remains visible in the ID box; the equal sign and value aren't displayed after they're validated.
The new value is stored in the symbol header file the next time you save the project. Only the symbol name remains visible in the ID box and the equal sign and value aren't displayed after they're validated.

## Change or Delete Symbols

Expand All @@ -114,14 +113,14 @@ While in the [Resource Symbols dialog box](../windows/resource-symbols-dialog-bo
1. Edit the symbol's name or value in the boxes provided in the **Change Symbol** dialog box.

> [!NOTE]
> To change a symbol that *is* assigned to a resource or object, you must use the resource editor or **Properties** window.
> To change a symbol that's assigned to a resource or object, you must use the resource editor or **Properties** window.

### To delete an unassigned (unused) symbol

In the [Resource Symbols dialog box](../windows/resource-symbols-dialog-box.md), select the symbol that you want to delete, and choose **Delete**.

> [!NOTE]
> Before deleting an unused symbol in a resource file, make sure it is not used elsewhere in the program or by resource files included at compile time.
> [!NOTE]
> Before deleting an unused symbol in a resource file, make sure it's not used elsewhere in the program or by resource files included at compile time.

## Include Symbols

Expand Down Expand Up @@ -156,9 +155,9 @@ The environment will correctly interpret these calculated symbols as long as:
Don't call the file `Resource.h`, since that is the filename normally used by the main symbol header file.

> [!NOTE]
> **Important** What you type in the Read-Only symbol directives box is included in the resource file exactly as you type it. Make sure what you type does not contain any spelling or syntax errors.
> What you type in the **Read-Only symbol directives** box is included in the resource file exactly as you type it. Make sure what you type does not contain any spelling or syntax errors.

Use the **Read-only symbol directives** box to include files with symbol definitions only. Don't include resource definitions; otherwise, duplicate resource definitions will be created when the file is saved.
Use the **Read-only symbol directives** box to include files with symbol definitions only. Don't include resource definitions, else duplicate resource definitions will be created when the file is saved.

1. Place the symbols in the file you specified.

Expand All @@ -179,5 +178,5 @@ Win32
## See Also

[Resource Identifiers (Symbols)](../windows/symbols-resource-identifiers.md)<br/>
[Create Symbols](../windows/creating-new-symbols.md)<br/>
[How to: Create Symbols](../windows/creating-new-symbols.md)<br/>
[Predefined Symbol IDs](../windows/predefined-symbol-ids.md)<br/>
18 changes: 8 additions & 10 deletions docs/windows/creating-new-symbols.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ms.assetid: 35168d31-3af6-4ecd-9362-3707d47b53f3

When you're beginning a new project, you may find it convenient to map out the symbol names you need before creating the resources to which they'll be assigned.

The **Resource Symbols** C++ dialog box allows you to add new resource symbols, change the symbols that are displayed, or skip to the location in the source code where a symbol is in use.
The **Resource Symbols** dialog box allows you to add new resource symbols, change the symbols that are displayed, or skip to the location in the source code where a symbol is in use.

The dialog box contains the following properties:

Expand All @@ -21,12 +21,12 @@ The dialog box contains the following properties:
|**Show read-only symbols**|When selected, displays read-only resources. By default, the **Resource Symbol** dialog box displays only the modifiable resources in your resource script file, but with this option selected, modifiable resources appear in bold text and read-only resources appear in plain text.|
|**Used by**|Displays the resource or resources using the symbol selected in the symbols list. To move to the editor for a given resource, select the resource in the **Used By** box and choose **View Use**.|
|**New**|Opens the **New Symbol** dialog box, which enables you to define the name and, if necessary, a value for a new symbolic resource identifier.|
|**Change**|Opens the **Change Symbol** dialog box, which allows you to change the name or value of a symbol. If the symbol is for a control or resource in use, the symbol can be changed only from the corresponding resource editor. For more information, see [Changing Unassigned Symbols](../windows/changing-unassigned-symbols.md).|
|**Change**|Opens the **Change Symbol** dialog box, which allows you to change the name or value of a symbol. If the symbol is for a control or resource in use, the symbol can be changed only from the corresponding resource editor. For more information, see [Manage Symbols](../windows/changing-unassigned-symbols.md).|
|**View Use**|Opens the resource that contains the symbol in the corresponding resource editor.|

## Create Symbols

### To create a new symbol
To create a new symbol:

1. In the **Resource Symbols** dialog box, choose **New**.

Expand All @@ -37,26 +37,24 @@ The dialog box contains the following properties:
1. Select **OK** to add the new symbol to the symbol list.

> [!NOTE]
> If you type a symbol name that already exists, a message box appears stating that a symbol with that name is already defined. You cannot define two or more symbols with the same name, but you can define different symbols with the same numeric value. For more information, see [Symbol Name Restrictions](../windows/symbol-name-restrictions.md) and [Symbol Value Restrictions](../windows/symbol-value-restrictions.md).
> If you type a symbol name that already exists, a message box appears stating that a symbol with that name is already defined. You can't define two or more symbols with the same name, but you can define different symbols with the same numeric value.

### To view resource symbols
To view resource symbols:

1. In [Resource View](../windows/resource-view-window.md), right-click your .rc file.

> [!NOTE]
> If your project doesn't already contain an .rc file, please see [Creating a New Resource Script File](../windows/how-to-create-a-resource-script-file.md).
> If your project doesn't already contain an .rc file, please see [How to: Create Resources](../windows/how-to-create-a-resource-script-file.md).

1. Select **Resource Symbols** from the shortcut menu to view a resource symbol table in the **Resource Symbols** dialog box.

> [!NOTE]
> To see predefined symbols, check the **Show read-only symbols** check box.

### To open the resource editor for a given symbol
To open the resource editor for a given symbol:

When you're browsing symbols in the **Resource Symbols**, you may want more information on how a particular symbol is used. The **View Use** button provides a quick way to get this information.

#### To move to the resource editor where a symbol is being used

1. Select a symbol in the **Name** box of the **Resource Symbols** dialog box.

1. In the **Used By** box, select the resource type that interests you.
Expand All @@ -72,5 +70,5 @@ Win32
## See Also

[Resource Identifiers (Symbols)](../windows/symbols-resource-identifiers.md)<br/>
[Manage Symbols](../windows/changing-a-symbol-or-symbol-name-id.md)<br/>
[How to: Manage Symbols](../windows/changing-a-symbol-or-symbol-name-id.md)<br/>
[Predefined Symbol IDs](../windows/predefined-symbol-ids.md)<br/>
12 changes: 7 additions & 5 deletions docs/windows/mfc-predefined-symbols.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ MFC projects always include several header files that support windows. These are
```cpp
#include <afxwin.h> //MFC core and standard components
#include <afxext.h> //MFC extensions
#include <afxdisp.h //MFC automation classes
#include <afxdisp.h> //MFC automation classes
#include <afxdtctl.h> //MFC support for Internet Explorer common controls
#include <afxcmn.h> //MFC support for Windows common controls.
```

The header files include symbol ID values for MFC common values. These symbols are only available when you're working in an MFC project. The AFX_ prefix is followed by the standard symbol name prefixes.
The header files include symbol ID values for MFC common values. These symbols are only available when you're working in an MFC project. The `AFX_` prefix is followed by the standard symbol name prefixes.

|||
|-|-|
Expand Down Expand Up @@ -199,7 +199,7 @@ The header files include symbol ID values for MFC common values. These symbols a
|AFX_IDS_UPDATING_ITEMS|AFX_IDS_USER_EXCEPTION|
|AFX_IDS_VERB_EDIT|AFX_IDS_VERB_PROPERTIES|

## MFC database programming symbols
## MFC Database Programming

The symbols in this table only appear in an MFC project when database support has been added. They support the MFC connection to SQL servers and database programming.

Expand All @@ -220,9 +220,11 @@ The symbols in this table only appear in an MFC project when database support ha
|AFX_IDP_SQL_SNAPSHOT_ NOT_SUPPORTED|AFX_IDP_SQL_SQL_CONFORMANCE|
|AFX_IDP_SQL_SQL_NO_TOTAL|AFX_IDP_SQL_UPDATE_DELETE_FAILED|

## MFC Windows programming symbols
## MFC Windows Programming

These symbols are also part of the MFC support files, but they support standard Windows application functions and actions. These symbols are used with menus. When you are working with menus in the **Menu Editor**, these symbols will appear in the **Property Window** associated with common menu commands. For instance, if your application has a **File** menu with an **Exit** command, that command will be associated with the symbol ID_APP_EXIT in the [Properties window](/visualstudio/ide/reference/properties-window).
These symbols are also part of the MFC support files, but they support standard Windows application functions and actions. These symbols are used with menus.

When you're working with menus in the **Menu Editor**, these symbols will appear in the **Property Window** associated with common menu commands. For instance, if your application has a **File** menu with an **Exit** command, that command will be associated with the symbol ID_APP_EXIT in the [Properties window](/visualstudio/ide/reference/properties-window).

||||
|-|-|-|
Expand Down
Loading