Skip to content

Commit 0b885b2

Browse files
openpublishbuildColin Robertson
authored andcommitted
Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master) (MicrosoftDocs#508)
* Update cricheditctrl-class.md LineLength is a wrapper of EM_LINELENGTH, which returns length in characters not bytes. * Update csettingsstore-class.md contraction between the meaning of bAdmin in the parameters and remarks section of CSettingsStore::CSettingsStore * Update clistbox-class_23.cpp the buffer required by later code would be 16 bytes in ANSI and 32 bytes in Unicode, preallocating 10 bytes is useless. * Fix unwind opcode values * Update algorithm.md Fix minor typo in Remarks section * Undesired indentation in CFile. Fix for undesired indentation in CFile constructor documentation. * Update cricheditctrl-class.md clarify that length is in TCHARs, add situations when index is out of bound, and when there's a carriage return based on EM_LINELENGTH docs
1 parent 79040b8 commit 0b885b2

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Initialize the storage of the list box to be 256 strings with
22
// about 10 characters per string, performance improvement.
3-
int n = m_myListBox.InitStorage(256, 10);
3+
int n = m_myListBox.InitStorage(256, 16*sizeof(TCHAR));
44
ASSERT(n != LB_ERRSPACE);
55

66
// Add 256 items to the list box.
@@ -9,4 +9,4 @@
99
{
1010
str.Format(_T("item string %d"), i);
1111
m_myListBox.AddString( str );
12-
}
12+
}

docs/mfc/reference/cfile-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ virtual void Abort();
123123
```
124124
CFile();
125125
CFile(CAtlTransactionManager* pTM);
126-
CFile(HANDLE hFile);
126+
CFile(HANDLE hFile);
127127
128128
129129
CFile(

docs/mfc/reference/cricheditctrl-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ int LineLength(int nLine = -1) const;
10581058
Specifies the character index of a character in the line whose length is to be retrieved. If this parameter is -1, the length of the current line (the line that contains the caret) is returned, not including the length of any selected text within the line. When `LineLength` is called for a single-line edit control, this parameter is ignored.
10591059

10601060
### Return Value
1061-
When `LineLength` is called for a multiple-line edit control, the return value is the length (in bytes) of the line specified by `nLine`. When `LineLength` is called for a single-line edit control, the return value is the length (in bytes) of the text in the edit control.
1061+
When `LineLength` is called for a multiple-line edit control, the return value is the length (in `TCHAR`) of the line specified by `nLine`. It does not include the carriage-return character at the end of the line. When `LineLength` is called for a single-line edit control, the return value is the length (in `TCHAR`) of the text in the edit control. If nLine is greater than the number of characters in the control, the return value is zero.
10621062

10631063
### Remarks
10641064
Use the [LineIndex](#lineindex) member function to retrieve a character index for a given line number within this `CRichEditCtrl` object.

docs/mfc/reference/csettingsstore-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ CSettingsStore(
106106
Boolean parameter that specifies whether the `CSettingsStore` object is created in read-only mode.
107107

108108
### Remarks
109-
If `bAdmin` is set to `false`, the `m_hKey` member variable is set to `HKEY_LOCAL_MACHINE`. If you set `bAdmin` to `true`, `m_hKey` is set to `HKEY_CURRENT_USER`.
109+
If `bAdmin` is set to `true`, the `m_hKey` member variable is set to `HKEY_LOCAL_MACHINE`. If you set `bAdmin` to `false`, `m_hKey` is set to `HKEY_CURRENT_USER`.
110110

111111
The security access depends on the `bReadOnly` parameter. If `bReadonly` is `false`, the security access will be set to `KEY_ALL_ACCESS`. If `bReadyOnly` is `true`, the security access will be set to a combination of `KEY_QUERY_VALUE, KEY_NOTIFY` and `KEY_ENUMERATE_SUB_KEYS`. For more information about security access together with the registry, see [Registry Key Security and Access Rights](http://msdn.microsoft.com/library/windows/desktop/ms724878).
112112

docs/standard-library/algorithm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Defines C++ Standard Library container template functions that perform algorithm
3737

3838
- The _copy suffix indicates that the algorithm not only manipulates the values of the elements but also copies the modified values into a destination range. The `reverse` algorithm reverses the order of the elements within a range, and the `reverse_copy` algorithm also copies the result into a destination range.
3939

40-
C++ Standard Library algorithms are often classified into groups that indicate something about their purpose or requirements. These include modifying algorithms that change the value of elements as compared with non-modifying algorithms that do not. Mutating algorithms change the order of elements, but not the values of their elements. Removing algorithms can eliminate elements from a range or a copy of a range. Sorting algorithms reorder the elements in a range in various ways and sorted range algorithms only act on algorithms whose elements have been sorted in a particular way.
40+
C++ Standard Library algorithms are often classified into groups that indicate something about their purpose or requirements. These include modifying algorithms that change the value of elements as compared with non-modifying algorithms that do not. Mutating algorithms change the order of elements, but not the values of their elements. Removing algorithms can eliminate elements from a range or a copy of a range. Sorting algorithms reorder the elements in a range in various ways and sorted range algorithms only act on ranges whose elements have been sorted in a particular way.
4141

4242
The C++ Standard Library numeric algorithms that are provided for numerical processing have their own header file [\<numeric>](../standard-library/numeric.md), and function objects and adaptors are defined in the header [\<functional>](../standard-library/functional.md) Function objects that return Boolean values are known as predicates. The default binary predicate is the comparison `operator<`. In general, the elements being ordered need to be less than comparable so that, given any two elements, it can be determined either that they are equivalent (in the sense that neither is less than the other) or that one is less than the other. This results in an ordering among the nonequivalent elements.
4343

0 commit comments

Comments
 (0)