Skip to content

Commit e791f14

Browse files
authored
Merge pull request MicrosoftDocs#1680 from msebolt/resource-file-consolidation-pr1
resource file consolidation pr1
2 parents 498861b + bf4318d commit e791f14

7 files changed

Lines changed: 76 additions & 128 deletions

‎.openpublishing.redirection.json‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7270,6 +7270,26 @@
72707270
"redirect_url": "/cpp/windows/overview-of-windows-programming-in-cpp",
72717271
"redirect_document_id": false
72727272
},
7273+
{
7274+
"source_path": "docs/windows/accelerator-key-property.md",
7275+
"redirect_url": "/cpp/windows/setting-accelerator-properties",
7276+
"redirect_document_id": false
7277+
},
7278+
{
7279+
"source_path": "docs/windows/accelerator-modifier-property.md",
7280+
"redirect_url": "/cpp/windows/setting-accelerator-properties",
7281+
"redirect_document_id": false
7282+
},
7283+
{
7284+
"source_path": "docs/windows/accelerator-type-property.md",
7285+
"redirect_url": "/cpp/windows/setting-accelerator-properties",
7286+
"redirect_document_id": false
7287+
},
7288+
{
7289+
"source_path": "docs/windows/id-property.md",
7290+
"redirect_url": "/cpp/windows/setting-accelerator-properties",
7291+
"redirect_document_id": false
7292+
},
72737293
{
72747294
"source_path": "docs/windows/activationfactory-activationfactory-constructor.md",
72757295
"redirect_url": "/cpp/windows/activationfactory-class#activationfactory",

‎docs/windows/TOC.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
#### [Previewing Resources](previewing-resources.md)
5757
#### [Accelerator Editor](accelerator-editor.md)
5858
##### [Setting Accelerator Properties](setting-accelerator-properties.md)
59-
###### [ID Property](id-property.md)
60-
###### [Accelerator Type Property](accelerator-type-property.md)
61-
###### [Accelerator Modifier Property](accelerator-modifier-property.md)
62-
###### [Accelerator Key Property](accelerator-key-property.md)
6359
##### [Associating an Accelerator Key with a Menu Item](associating-an-accelerator-key-with-a-menu-item.md)
6460
##### [Editing Accelerator Tables](editing-accelerator-tables.md)
6561
###### [Editing in an Accelerator Table](editing-in-an-accelerator-table.md)

‎docs/windows/accelerator-key-property.md‎

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

‎docs/windows/accelerator-modifier-property.md‎

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

‎docs/windows/accelerator-type-property.md‎

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

‎docs/windows/id-property.md‎

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

‎docs/windows/setting-accelerator-properties.md‎

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,75 @@
11
---
22
title: "Setting Accelerator Properties (C++)"
33
ms.date: "11/04/2016"
4-
helpviewer_keywords: ["accelerator properties", "properties [C++], accelerator properties", "Type property", "Key property", "Modifier property"]
4+
helpviewer_keywords: ["accelerator properties", "properties [C++], accelerator properties", "Type property", "Key property", "Modifier property", "VIRTKEY", "Key property", "ID property"]
55
ms.assetid: 0fce9156-3025-4e18-b034-e219a4c65812
66
---
7-
# Setting Accelerator Properties
7+
# Setting Accelerator properties
88

9-
You can set accelerator properties in the [Properties window](/visualstudio/ide/reference/properties-window) at any time. You can also use the **Accelerator** editor to modify the accelerator properties in the accelerator table. Changes made using the **Properties** window or the **Accelerator** editor have the same result: edits are immediately reflected in the accelerator table.
9+
You can set accelerator properties in the [Properties window](/visualstudio/ide/reference/properties-window) at any time. You can also use the [Accelerator editor](../windows/accelerator-editor.md) to modify the accelerator properties in the accelerator table. Changes made using the **Properties** window or the **Accelerator** editor have the same result: edits are immediately reflected in the accelerator table.
1010

11-
There are three properties for each accelerator ID:
11+
## ID property
1212

13-
- The [Modifier property](../windows/accelerator-modifier-property.md) sets control key combinations for the accelerator.
13+
The **ID** property references each accelerator table entry in program code. This entry is the command value that the program will receive when a user presses the accelerator key or a key combination. To make an accelerator the same as a menu item, make their IDs the same (so long as the ID of the accelerator table is the same as the ID for the menu resource).
1414

15-
> [!NOTE]
16-
> In the **Properties** window, this property appears as three separate Boolean properties, all of which can be controlled independently: **Alt**, **Ctrl**, and **Shift**.
15+
There are three properties for each accelerator ID: the **Modifier** property, the **Key** property, and the **Type** property.
1716

18-
- The [Key property](../windows/accelerator-key-property.md) sets the actual key to use as the accelerator.
17+
## Modifier property
1918

20-
- The [Type property](../windows/accelerator-type-property.md) determines whether the key is interpreted as virtual (VIRTKEY) or ASCII/ANSI.
19+
The **Modifier** property sets control key combinations for the accelerator.
20+
21+
> [!NOTE]
22+
> In the **Properties** window, this property appears as three separate **Boolean** properties, all of which can be controlled independently: **Alt**, **Ctrl**, and **Shift**.
23+
24+
The following are legal entries for the **Modifier** property in the accelerator table:
25+
26+
|Value|Description|
27+
|-----------|-----------------|
28+
|**None**|User presses only the **Key** value. This value is most effectively used with the ASCII/ANSI values 001 through 026, which is interpreted as ^A through ^Z (**Ctrl+A** through **Ctrl+Z**).|
29+
|**Alt**|User must press the **Alt** key before the **Key** value.|
30+
|**Ctrl**|User must press the **Ctrl** key before the **Key** value. Not valid with ASCII Type.|
31+
|**Shift**|User must press the **Shift** key before the **Key** value.|
32+
|**Ctrl+Alt**|User must press the **Ctrl** key and the **Alt** key before the **Key** value. Not valid with ASCII Type.|
33+
|**Ctrl+Shift**|User must press the **Ctrl** key and the **Shift** key before the **Key** value. Not valid with ASCII Type.|
34+
|**Alt+Shift**|User must press the **Alt** key and the **Shift** key before the **Key** value. Not valid with ASCII Type.|
35+
|**Ctrl+Alt+Shift**|User must press **Ctrl**, **Alt**, and **Shift** before the **Key** value. Not valid with ASCII Type.|
36+
37+
## Key property
38+
39+
The **Key** property sets the actual key to use as the accelerator.
40+
41+
The following are legal entries for the **Key** property in the accelerator table:
42+
43+
|Value|Description|
44+
|-----------|-----------------|
45+
|An integer between 0 and 255 in decimal format.|The value determines whether the value is treated as ASCII or ANSI as follows:<br/><br/>- Single-digit numbers are always interpreted as the corresponding key, rather than as ASCII or ANSI values.<br/>- Values from 1 through 26, when preceded with zeros, are interpreted as ^A through ^Z, which represents the ASCII value of the letters of the alphabet when pressed with the **Ctrl** key held down.<br/>- Values from 27-32 are always interpreted as three-digit decimal values 027 through 032.<br/>- Values from 033 through 255, whether preceded by 0's or not are interpreted as ANSI values.|
46+
|A single keyboard character.|Uppercase A - Z or the numbers 0 - 9 can be either ASCII or virtual key values; any other character is ASCII only.|
47+
|A single keyboard character in the range A - Z (uppercase only), preceded by a caret (^) (for example, ^C).|This option enters the ASCII value of the key when it's pressed with the **Ctrl** key held down.|
48+
|Any valid virtual key identifier.|The drop-down Key box in the Accelerator table contains a list of standard virtual key identifiers.|
49+
50+
> [!NOTE]
51+
> When entering an ASCII value, the modifier property options are limited. The only control key available for use is the **Alt** key.
52+
53+
> [!TIP]
54+
> Another way to define an accelerator key is to right-click an entry or multiple entries in the Accelerator table, choose **Next Key Typed** from the shortcut menu, and then press any of the keys or key combinations on the keyboard. The **Next Key Typed** command is also available from the **Edit** menu.
55+
56+
## Type property
57+
58+
The **Type** property determines whether the shortcut key combination associated with the accelerator ID is interpreted as an ASCII/ANSI key value or a virtual key (VIRTKEY) combination.
59+
60+
- If the **Type** property is ASCII, the **Modifier** property may only be `None` or `Alt`, or it can have an accelerator that uses the **Ctrl** key (specified by preceding the key with a `^`).
61+
62+
- If the **Type** property is VIRTKEY, any combination of `Modifier` and `Key` values is valid.
63+
64+
> [!NOTE]
65+
> If you want to enter a value into the accelerator table and have the value be treated as ASCII/ANSI, simply click the **Type** for the entry in the table and select ASCII from the drop down list. However, if you use the **Next Key Typed** command (**Edit** menu) to specify the `Key`, you must change the **Type** property from VIRTKEY to ASCII *before* entering the `Key` code.
2166
2267
## Requirements
2368

2469
Win32
2570

26-
## See Also
71+
## See also
2772

73+
[Editing in an Accelerator Table](../windows/editing-in-an-accelerator-table.md)<br/>
2874
[Predefined Accelerator Keys](../windows/predefined-accelerator-keys.md)<br/>
2975
[Resource Editors](../windows/resource-editors.md)<br/>
30-
[Accelerator Editor](../windows/accelerator-editor.md)

0 commit comments

Comments
 (0)