diff --git a/docs/assembler/masm/ml-and-ml64-command-line-reference.md b/docs/assembler/masm/ml-and-ml64-command-line-reference.md index d664d6e882a..1f62e48b557 100644 --- a/docs/assembler/masm/ml-and-ml64-command-line-reference.md +++ b/docs/assembler/masm/ml-and-ml64-command-line-reference.md @@ -34,7 +34,7 @@ The options listed in the following table: | **`/Cx`** | Preserves case in public and extern symbols. | | **`/D`** *`symbol`*⟦=*`value`*⟧ | Defines a text macro with the given name *`symbol`*. If *`value`* is missing, it's blank. Multiple tokens separated by spaces must be enclosed in quotation marks. | | **`/EP`** | Generates a preprocessed source listing (sent to `STDOUT`). See **`/Sf`**. | -| **`/ERRORREPORT`** [ **`NONE`** | **`PROMPT`** | **`QUEUE`** | **`SEND`** ] | Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. | +| **`/ERRORREPORT`** [ **`NONE`** \| **`PROMPT`** \| **`QUEUE`** \| **`SEND`** ] | Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. | | **`/F`** *`hexnum`* | Sets stack size to *`hexnum`* bytes (the same as **`/link /STACK:`**). The value must be expressed in hexadecimal notation. There must be a space between **`/F`** and *`hexnum`*. | | **`/Fe`** *`filename`* | Names the executable file. | | **`/Fl`**⟦*`filename`*⟧ | Generates an assembled code listing. See **/Sf**. | diff --git a/docs/atl-mfc-shared/reference/cpoint-class.md b/docs/atl-mfc-shared/reference/cpoint-class.md index 94f05597bec..40a5ef14ef7 100644 --- a/docs/atl-mfc-shared/reference/cpoint-class.md +++ b/docs/atl-mfc-shared/reference/cpoint-class.md @@ -4,9 +4,8 @@ title: "CPoint Class" ms.date: "11/04/2016" f1_keywords: ["CPoint", "ATLTYPES/ATL::CPoint", "ATLTYPES/ATL::CPoint::CPoint", "ATLTYPES/ATL::CPoint::Offset"] helpviewer_keywords: ["LPPOINT structure", "POINT structure", "CPoint class"] -ms.assetid: a6d4db93-35cc-444d-9221-c3e160f6edaa --- -# CPoint Class +# `CPoint` Class Similar to the Windows `POINT` structure. @@ -22,30 +21,30 @@ class CPoint : public tagPOINT |Name|Description| |----------|-----------------| -|[CPoint::CPoint](#cpoint)|Constructs a `CPoint`.| +|[`CPoint::CPoint`](#cpoint)|Constructs a `CPoint`.| ### Public Methods |Name|Description| |----------|-----------------| -|[CPoint::Offset](#offset)|Adds values to the `x` and `y` members of the `CPoint`.| +|[`CPoint::Offset`](#offset)|Adds values to the `x` and `y` members of the `CPoint`.| ### Public Operators |Name|Description| |----------|-----------------| -|[CPoint::operator -](#operator_-)|Returns the difference of a `CPoint` and a size, or the negation of a point, or the size difference between two points, or the offset by a negative size.| -|[CPoint::operator !=](#operator_neq)|Checks for inequality between two points.| -|[CPoint::operator +](#operator_add)|Returns the sum of a `CPoint` and a size or point, or a `CRect` offset by a size.| -|[CPoint::operator +=](#operator_add_eq)|Offsets `CPoint` by adding a size or point.| -|[CPoint::operator -=](#operator_-_eq)|Offsets `CPoint` by subtracting a size or point.| -|[CPoint::operator ==](#operator_eq_eq)|Checks for equality between two points.| +|[`CPoint::operator -`](#operator_-)|Returns the difference of a `CPoint` and a `SIZE`, or the negation of a `POINT`, or the `CSize` difference between two `POINT`s, or the offset by a negative `SIZE`.| +|[`CPoint::operator !=`](#operator_neq)|Checks for inequality between two `POINT`s.| +|[`CPoint::operator +`](#operator_add)|Returns the sum of a `CPoint` and a `SIZE` or `POINT`, or a `CRect` offset by a `SIZE`.| +|[`CPoint::operator +=`](#operator_add_eq)|Offsets `CPoint` by adding a `SIZE` or `POINT`.| +|[`CPoint::operator -=`](#operator_-_eq)|Offsets `CPoint` by subtracting a `SIZE` or `POINT`.| +|[`CPoint::operator ==`](#operator_eq_eq)|Checks for equality between two `POINT`s.| ## Remarks -It also includes member functions to manipulate `CPoint` and [POINT](/windows/win32/api/windef/ns-windef-point) structures. +It also includes member functions to manipulate `CPoint` and [`POINT`](/windows/win32/api/windef/ns-windef-point) structures. -A `CPoint` object can be used wherever a `POINT` structure is used. The operators of this class that interact with a "size" accept either [CSize](../../atl-mfc-shared/reference/csize-class.md) objects or [SIZE](/windows/win32/api/windef/ns-windef-size) structures, since the two are interchangeable. +A `CPoint` object can be used wherever a `POINT` structure is used. The operators of this class that interact with a `SIZE` accept either [`CSize`](../../atl-mfc-shared/reference/csize-class.md) objects or [`SIZE`](/windows/win32/api/windef/ns-windef-size) structures, since the two are interchangeable. > [!NOTE] > This class is derived from the `tagPOINT` structure. (The name `tagPOINT` is a less commonly used name for the `POINT` structure.) This means that the data members of the `POINT` structure, `x` and `y`, are accessible data members of `CPoint`. @@ -61,9 +60,9 @@ A `CPoint` object can be used wherever a `POINT` structure is used. The operator ## Requirements -**Header:** atltypes.h +**Header:** `atltypes.h` -## CPoint::CPoint +## `CPoint::CPoint` Constructs a `CPoint` object. @@ -77,20 +76,20 @@ CPoint(LPARAM dwPoint) throw(); ### Parameters -*initX*
+*`initX`*\ Specifies the value of the `x` member of `CPoint`. -*initY*
+*`initY`*\ Specifies the value of the `y` member of `CPoint`. -*initPt*
-[POINT](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` that specifies the values used to initialize `CPoint`. +*`initPt`*\ +[`POINT`](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` that specifies the values used to initialize `CPoint`. -*initSize*
-[SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) that specifies the values used to initialize `CPoint`. +*`initSize`*\ +[`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) that specifies the values used to initialize `CPoint`. -*dwPoint*
-Sets the `x` member to the low-order word of *dwPoint* and the `y` member to the high-order word of *dwPoint*. +*`dwPoint`*\ +Sets the `x` member to the low-order word of *`dwPoint`* and the `y` member to the high-order word of *`dwPoint`*. ### Remarks @@ -123,7 +122,7 @@ CPoint ptFromDouble(dwSize); ASSERT(ptFromDouble == ptMFCHere); ``` -## CPoint::Offset +## `CPoint::Offset` Adds values to the `x` and `y` members of the `CPoint`. @@ -135,25 +134,25 @@ void Offset(SIZE size) throw(); ### Parameters -*xOffset*
+*`xOffset`*\ Specifies the amount to offset the `x` member of the `CPoint`. -*yOffset*
+*`yOffset`*\ Specifies the amount to offset the `y` member of the `CPoint`. -*point*
-Specifies the amount ( [POINT](/windows/win32/api/windef/ns-windef-point) or `CPoint`) to offset the `CPoint`. +*`point`*\ +Specifies the amount ([`POINT`](/windows/win32/api/windef/ns-windef-point) or `CPoint`) to offset the `CPoint`. -*size*
-Specifies the amount ( [SIZE](/windows/win32/api/windef/ns-windef-size) or [CSize](../../atl-mfc-shared/reference/csize-class.md)) to offset the `CPoint`. +*`size`*\ +Specifies the amount ([`SIZE`](/windows/win32/api/windef/ns-windef-size) or [`CSize`](../../atl-mfc-shared/reference/csize-class.md)) to offset the `CPoint`. ### Example [!code-cpp[NVC_ATLMFC_Utilities#28](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_1.cpp)] -## CPoint::operator == +## `CPoint::operator ==` -Checks for equality between two points. +Checks for equality between two `POINT`s. ``` BOOL operator==(POINT point) const throw(); @@ -161,20 +160,20 @@ BOOL operator==(POINT point) const throw(); ### Parameters -*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object. +*`point`*\ +Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object. ### Return Value -Nonzero if the points are equal; otherwise 0. +Nonzero if the `POINT`s are equal; otherwise 0. ### Example [!code-cpp[NVC_ATLMFC_Utilities#29](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_2.cpp)] -## CPoint::operator != +## `CPoint::operator !=` -Checks for inequality between two points. +Checks for inequality between two `POINT`s. ``` BOOL operator!=(POINT point) const throw(); @@ -182,20 +181,20 @@ BOOL operator!=(POINT point) const throw(); ### Parameters -*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object. +*`point`*\ +Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or `CPoint` object. ### Return Value -Nonzero if the points are not equal; otherwise 0. +Nonzero if the `POINT`s aren't equal; otherwise 0. ### Example [!code-cpp[NVC_ATLMFC_Utilities#30](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_3.cpp)] -## CPoint::operator += +## `CPoint::operator +=` -The first overload adds a size to the `CPoint`. +The first overload adds a `SIZE` to the `CPoint`. ```cpp void operator+=(SIZE size) throw(); @@ -204,27 +203,27 @@ void operator+=(POINT point) throw(); ### Parameters -*size*
-Contains a [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) object. +*`size`*\ +Contains a [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) object. -*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](../../atl-mfc-shared/reference/cpoint-class.md) object. +*`point`*\ +Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object. ### Remarks -The second overload adds a point to the `CPoint`. +The second overload adds a `POINT` to the `CPoint`. In both cases, addition is done by adding the `x` (or `cx`) member of the right-hand operand to the `x` member of the `CPoint` and adding the `y` (or `cy`) member of the right-hand operand to the `y` member of the `CPoint`. -For example, adding `CPoint(5, -7)` to a variable which contains `CPoint(30, 40)` changes the variable to `CPoint(35, 33)`. +For example, adding `CPoint(5, -7)` to a variable that contains `CPoint(30, 40)` changes the variable to `CPoint(35, 33)`. ### Example [!code-cpp[NVC_ATLMFC_Utilities#31](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_4.cpp)] -## CPoint::operator -= +## `CPoint::operator -=` -The first overload subtracts a size from the `CPoint`. +The first overload subtracts a `SIZE` from the `CPoint`. ```cpp void operator-=(SIZE size) throw(); @@ -233,25 +232,25 @@ void operator-=(POINT point) throw(); ### Parameters -*size*
-Contains a [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) object. +*`size`*\ +Contains a [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) object. -*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](../../atl-mfc-shared/reference/cpoint-class.md) object. +*`point`*\ +Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object. ### Remarks -The second overload subtracts a point from the `CPoint`. +The second overload subtracts a `POINT` from the `CPoint`. In both cases, subtraction is done by subtracting the `x` (or `cx`) member of the right-hand operand from the `x` member of the `CPoint` and subtracting the `y` (or `cy`) member of the right-hand operand from the `y` member of the `CPoint`. -For example, subtracting `CPoint(5, -7)` from a variable which contains `CPoint(30, 40)` changes the variable to `CPoint(25, 47)`. +For example, subtracting `CPoint(5, -7)` from a variable that contains `CPoint(30, 40)` changes the variable to `CPoint(25, 47)`. ### Example [!code-cpp[NVC_ATLMFC_Utilities#32](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_5.cpp)] -## CPoint::operator + +## `CPoint::operator +` Use this operator to offset `CPoint` by a `CPoint` or `CSize` object, or to offset a `CRect` by a `CPoint`. @@ -263,30 +262,30 @@ CRect operator+(const RECT* lpRect) const throw(); ### Parameters -*size*
-Contains a [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) object. +*`size`*\ +Contains a [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) object. -*point*
-Contains a [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](../../atl-mfc-shared/reference/cpoint-class.md) object. +*`point`*\ +Contains a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object. -*lpRect*
-Contains a pointer to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or [CRect](../../atl-mfc-shared/reference/crect-class.md) object. +*`lpRect`*\ +Contains a pointer to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or [`CRect`](../../atl-mfc-shared/reference/crect-class.md) object. ### Return Value -A `CPoint` that is offset by a size, a `CPoint` that is offset by a point, or a `CRect` offset by a point. +A `CPoint` that is offset by a `SIZE`, a `CPoint` that is offset by a `POINT`, or a `CRect` offset by a `POINT`. ### Remarks For example, using one of the first two overloads to offset the point `CPoint(25, -19)` by a point `CPoint(15, 5)` or size `CSize(15, 5)` returns the value `CPoint(40, -14)`. -Adding a rectangle to a point returns the rectangle after being offset by the `x` and `y` values specified in the point. For example, using the last overload to offset a rectangle `CRect(125, 219, 325, 419)` by a point `CPoint(25, -19)` returns `CRect(150, 200, 350, 400)`. +Adding a `CRect` to a `POINT` returns the `CRect` after being offset by the `x` and `y` values specified in the `POINT`. For example, using the last overload to offset a rectangle `CRect(125, 219, 325, 419)` by a point `CPoint(25, -19)` returns `CRect(150, 200, 350, 400)`. ### Example [!code-cpp[NVC_ATLMFC_Utilities#33](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_6.cpp)] -## CPoint::operator - +## `CPoint::operator -` Use one of the first two overloads to subtract a `CPoint` or `CSize` object from `CPoint`. @@ -299,18 +298,18 @@ CPoint operator-() const throw(); ### Parameters -*point*
-A [POINT](/windows/win32/api/windef/ns-windef-point) structure or [CPoint](../../atl-mfc-shared/reference/cpoint-class.md) object. +*`point`*\ +A [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object. -*size*
-A [SIZE](/windows/win32/api/windef/ns-windef-size) structure or [CSize](../../atl-mfc-shared/reference/csize-class.md) object. +*`size`*\ +A [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure or [`CSize`](../../atl-mfc-shared/reference/csize-class.md) object. -*lpRect*
-A pointer to a [RECT](/windows/win32/api/windef/ns-windef-rect) structure or a [CRect](../../atl-mfc-shared/reference/crect-class.md) object. +*`lpRect`*\ +A pointer to a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure or a [`CRect`](../../atl-mfc-shared/reference/crect-class.md) object. ### Return Value -A `CSize` that is the difference between two points, a `CPoint` that is offset by the negation of a size, a `CRect` that is offset by the negation of a point, or a `CPoint` that is the negation of a point. +A `CSize` that is the difference between two `POINT`s, a `CPoint` that is offset by the negation of a `SIZE`, a `CRect` that is offset by the negation of a `POINT`, or a `CPoint` that is the negation of a `POINT`. ### Remarks @@ -320,9 +319,9 @@ For example, using the first overload to find the difference between two points Subtracting a `CSize` from `CPoint` does the same calculation as above but returns a `CPoint` object, not a `CSize` object. For example, using the second overload to find the difference between the point `CPoint(25, -19)` and the size `CSize(15, 5)` returns `CPoint(10, -24)`. -Subtracting a rectangle from a point returns the rectangle offset by the negatives of the `x` and `y` values specified in the point. For example, using the last overload to offset the rectangle `CRect(125, 200, 325, 400)` by the point `CPoint(25, -19)` returns `CRect(100, 219, 300, 419)`. +Subtracting a rectangle from a `POINT` returns the rectangle offset by the negatives of the `x` and `y` values specified in the `POINT`. For example, using the last overload to offset the rectangle `CRect(125, 200, 325, 400)` by the point `CPoint(25, -19)` returns `CRect(100, 219, 300, 419)`. -Use the unary operator to negate a point. For example, using the unary operator with the point `CPoint(25, -19)` returns `CPoint(-25, 19)`. +Use the unary operator to negate a `POINT`. For example, using the unary operator with the point `CPoint(25, -19)` returns `CPoint(-25, 19)`. ### Example @@ -330,8 +329,8 @@ Use the unary operator to negate a point. For example, using the unary operator ## See also -[MFC Sample MDI](../../overview/visual-cpp-samples.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[POINT Structure](/windows/win32/api/windef/ns-windef-point)
-[CRect Class](../../atl-mfc-shared/reference/crect-class.md)
-[CSize Class](../../atl-mfc-shared/reference/csize-class.md) +[MFC Sample MDI](../../overview/visual-cpp-samples.md)\ +[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[`POINT` Structure](/windows/win32/api/windef/ns-windef-point)\ +[`CRect` Class](../../atl-mfc-shared/reference/crect-class.md)\ +[`CSize` Class](../../atl-mfc-shared/reference/csize-class.md) diff --git a/docs/atl-mfc-shared/string-data-management.md b/docs/atl-mfc-shared/string-data-management.md index 80640e06c2b..5fa0824eac2 100644 --- a/docs/atl-mfc-shared/string-data-management.md +++ b/docs/atl-mfc-shared/string-data-management.md @@ -3,19 +3,18 @@ description: "Learn more about: String Data Management" title: "String Data Management" ms.date: "11/04/2016" helpviewer_keywords: ["Unicode, string objects"] -ms.assetid: 0b53a542-eeb1-4108-9ada-6700645b6f8f --- # String Data Management Visual C++ provides several ways to manage string data: -- [String Manipulation](../c-runtime-library/string-manipulation-crt.md) for working with C-style null-terminated strings +- [String Manipulation](../c-runtime-library/string-manipulation-crt.md) for working with C-style `NULL` terminated strings - Win32 API functions for managing strings -- MFC's class [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md), which provides flexible, resizable string objects +- MFC's class [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md), which provides flexible, resizable string objects -- Class [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md), which provides an MFC-independent string object with the same functionality as `CString` +- Class [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md), which provides an MFC-independent string object with the same functionality as `CString` Nearly all programs work with string data. MFC's `CString` class is often the best solution for flexible string handling. Starting with version 7.0, `CString` can be used in MFC or MFC-independent programs. Both the run-time library and `CString` support strings containing multibyte (wide) characters, as in Unicode or MBCS programming. @@ -23,11 +22,11 @@ This article describes the general-purpose services that the class library provi - [Unicode and MBCS Provide portability](#_core_unicode_and_mbcs_provide_portability) -- [CStrings and const char Pointers](#_core_cstrings_and_const_char_pointers) +- [`CStrings` and `const char` Pointers](#_core_cstrings_and_const_char_pointers) -- [CString Reference Counting](#_core_cstring_reference_counting) +- [`CString` Reference Counting](#_core_cstring_reference_counting) -The [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md) class provides support for manipulating strings. It is intended to replace and extend the functionality normally provided by the C run-time library string package. The `CString` class supplies member functions and operators for simplified string handling, similar to those found in Basic. The class also provides constructors and operators for constructing, assigning, and comparing `CString`s and standard C++ string data types. Because `CString` is not derived from `CObject`, you can use `CString` objects independently of most of the Microsoft Foundation Class Library (MFC). +The [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md) class provides support for manipulating strings. It's intended to replace and extend the functionality normally provided by the C run-time library string package. The `CString` class supplies member functions and operators for simplified string handling, similar to those found in Basic. The class also provides constructors and operators for constructing, assigning, and comparing `CString`s and standard C++ string data types. Because `CString` isn't derived from `CObject`, you can use `CString` objects independently of most of the Microsoft Foundation Class Library (MFC). `CString` objects follow "value semantics." A `CString` object represents a unique value. Think of a `CString` as an actual string, not as a pointer to a string. @@ -35,10 +34,10 @@ A `CString` object represents a sequence of a variable number of characters. `CS ## Unicode and MBCS Provide Portability -With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Unicode and multibyte character sets (MBCS). This support makes it easier for you to write portable applications that you can build for either Unicode or ANSI characters. To enable this portability, each character in a `CString` object is of type TCHAR, which is defined as **`wchar_t`** if you define the symbol _UNICODE when you build your application, or as **`char`** if not. A **`wchar_t`** character is 16 bits wide. MBCS is enabled if you build with the symbol _MBCS defined. MFC itself is built with either the _MBCS symbol (for the NAFX libraries) or the _UNICODE symbol (for the UAFX libraries) defined. +With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Unicode and multibyte character sets (MBCS). This support makes it easier for you to write portable applications that you can build for either Unicode or ANSI characters. To enable this portability, each character in a `CString` object is of type `TCHAR`, which is defined as **`wchar_t`** if you define the symbol `_UNICODE` when you build your application, or as **`char`** if not. A **`wchar_t`** character is 16 bits wide. MBCS is enabled if you build with the symbol `_MBCS` defined. MFC itself is built with either the `_MBCS` symbol (for the NAFX libraries) or the `_UNICODE` symbol (for the UAFX libraries) defined. > [!NOTE] -> The `CString` examples in this and the accompanying articles on strings show literal strings properly formatted for Unicode portability, using the _T macro, which translates the literal string to the form: +> The `CString` examples in this and the accompanying articles on strings show literal strings properly formatted for Unicode portability, using the `_T` macro, which translates the literal string to the form: `L"literal string"` @@ -48,34 +47,34 @@ With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Un [!code-cpp[NVC_ATLMFC_Utilities#187](../atl-mfc-shared/codesnippet/cpp/string-data-management_1.cpp)] > [!NOTE] -> is translated as a Unicode string if _UNICODE is defined or as an ANSI string if not. For more information, see the article [Unicode and Multibyte Character Set (MBCS) Support](../atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md). +> is translated as a Unicode string if `_UNICODE` is defined or as an ANSI string if not. For more information, see the article [Unicode and Multibyte Character Set (MBCS) Support](../atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md). -A `CString` object can store up to INT_MAX (2,147,483,647) characters. The TCHAR data type is used to get or set individual characters inside a `CString` object. Unlike character arrays, the `CString` class has a built-in memory allocation capability. This allows `CString` objects to automatically grow as needed (that is, you do not have to worry about growing a `CString` object to fit longer strings). +A `CString` object can store up to `INT_MAX` (2,147,483,647) characters. The `TCHAR` data type is used to get or set individual characters inside a `CString` object. Unlike character arrays, the `CString` class has a built-in memory allocation capability. This allows `CString` objects to automatically grow as needed (that is, you don't have to worry about growing a `CString` object to fit longer strings). -## CStrings and const char Pointers +## `CStrings` and `const char` Pointers -A `CString` object also can act like a literal C-style string (an `PCXSTR`, which is the same as **const char**\* if not under Unicode). The [CSimpleStringT::operator PCXSTR](../atl-mfc-shared/reference/csimplestringt-class.md#operator_pcxstr) conversion operator allows `CString` objects to be freely substituted for character pointers in function calls. The **CString( LPCWSTR** `pszSrc` **)** constructor allows character pointers to be substituted for `CString` objects. +A `CString` object also can act like a literal C-style string (an `PCXSTR`, which is the same as `const char*` if not under Unicode). The [`CSimpleStringT::operator PCXSTR`](../atl-mfc-shared/reference/csimplestringt-class.md#operator_pcxstr) conversion operator allows `CString` objects to be freely substituted for character pointers in function calls. The `CString(LPCWSTR pszSrc)` constructor allows character pointers to be substituted for `CString` objects. -No attempt is made to fold `CString` objects. If you make two `CString` objects containing `Chicago`, for example, the characters in `Chicago` are stored in two places. (This may not be true of future versions of MFC, so you should not depend on it.) +No attempt is made to fold `CString` objects. If you make two `CString` objects containing `Chicago`, for example, the characters in `Chicago` are stored in two places. (This may not be true of future versions of MFC, so you shouldn't depend on it.) > [!NOTE] -> Use the [CSimpleStringT::GetBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#getbuffer) and [CSimpleStringT::ReleaseBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#releasebuffer) member functions when you need to directly access a `CString` as a nonconstant pointer to a character. +> Use the [`CSimpleStringT::GetBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#getbuffer) and [`CSimpleStringT::ReleaseBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#releasebuffer) member functions when you need to directly access a `CString` as a nonconstant pointer to a character. > [!NOTE] -> Use the [CStringT::AllocSysString](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring) and [CStringT::SetSysString](../atl-mfc-shared/reference/cstringt-class.md#setsysstring) member functions to allocate and set BSTR objects used in Automation (formerly known as OLE Automation). +> Use the [`CStringT::AllocSysString`](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring) and [`CStringT::SetSysString`](../atl-mfc-shared/reference/cstringt-class.md#setsysstring) member functions to allocate and set `BSTR` objects used in Automation (formerly known as OLE Automation). > [!NOTE] > Where possible, allocate `CString` objects on the frame rather than on the heap. This saves memory and simplifies parameter passing. -The `CString` class is not implemented as a Microsoft Foundation Class Library collection class, though `CString` objects can certainly be stored as elements in collections. +The `CString` class isn't implemented as a Microsoft Foundation Class Library collection class, though `CString` objects can certainly be stored as elements in collections. -## CString Reference Counting +## `CString` Reference Counting -As of MFC version 4.0, when [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md) objects are copied, MFC increments a reference count rather than copying the data. This makes passing parameters by value and returning `CString` objects by value more efficient. These operations cause the copy constructor to be called, sometimes more than once. Incrementing a reference count reduces that overhead for these common operations and makes using `CString` a more attractive option. +As of MFC version 4.0, when [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md) objects are copied, MFC increments a reference count rather than copying the data. This makes passing parameters by value and returning `CString` objects by value more efficient. These operations cause the copy constructor to be called, sometimes more than once. Incrementing a reference count reduces that overhead for these common operations and makes using `CString` a more attractive option. -As each copy is destroyed, the reference count in the original object is decremented. The original `CString` object is not destroyed until its reference count is reduced to zero. +As each copy is destroyed, the reference count in the original object is decremented. The original `CString` object isn't destroyed until its reference count is reduced to zero. -You can use the `CString` member functions [CSimpleStringT::LockBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#lockbuffer) and [CSimpleStringT::UnlockBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#unlockbuffer) to disable or enable reference counting. +You can use the `CString` member functions [`CSimpleStringT::LockBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#lockbuffer) and [`CSimpleStringT::UnlockBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#unlockbuffer) to disable or enable reference counting. ## See also diff --git a/docs/atl/reference/cwindow-class.md b/docs/atl/reference/cwindow-class.md index f342adc8fa6..ec8e1f2c778 100644 --- a/docs/atl/reference/cwindow-class.md +++ b/docs/atl/reference/cwindow-class.md @@ -4,9 +4,8 @@ title: "CWindow Class" ms.date: "11/04/2016" f1_keywords: ["CWindow", "ATLWIN/ATL::CWindow", "ATLWIN/ATL::CWindow::CWindow", "ATLWIN/ATL::CWindow::ArrangeIconicWindows", "ATLWIN/ATL::CWindow::Attach", "ATLWIN/ATL::CWindow::BeginPaint", "ATLWIN/ATL::CWindow::BringWindowToTop", "ATLWIN/ATL::CWindow::CenterWindow", "ATLWIN/ATL::CWindow::ChangeClipboardChain", "ATLWIN/ATL::CWindow::CheckDlgButton", "ATLWIN/ATL::CWindow::CheckRadioButton", "ATLWIN/ATL::CWindow::ChildWindowFromPoint", "ATLWIN/ATL::CWindow::ChildWindowFromPointEx", "ATLWIN/ATL::CWindow::ClientToScreen", "ATLWIN/ATL::CWindow::Create", "ATLWIN/ATL::CWindow::CreateCaret", "ATLWIN/ATL::CWindow::CreateGrayCaret", "ATLWIN/ATL::CWindow::CreateSolidCaret", "ATLWIN/ATL::CWindow::DeferWindowPos", "ATLWIN/ATL::CWindow::DestroyWindow", "ATLWIN/ATL::CWindow::Detach", "ATLWIN/ATL::CWindow::DlgDirList", "ATLWIN/ATL::CWindow::DlgDirListComboBox", "ATLWIN/ATL::CWindow::DlgDirSelect", "ATLWIN/ATL::CWindow::DlgDirSelectComboBox", "ATLWIN/ATL::CWindow::DragAcceptFiles", "ATLWIN/ATL::CWindow::DrawMenuBar", "ATLWIN/ATL::CWindow::EnableScrollBar", "ATLWIN/ATL::CWindow::EnableWindow", "ATLWIN/ATL::CWindow::EndPaint", "ATLWIN/ATL::CWindow::FlashWindow", "ATLWIN/ATL::CWindow::GetClientRect", "ATLWIN/ATL::CWindow::GetDC", "ATLWIN/ATL::CWindow::GetDCEx", "ATLWIN/ATL::CWindow::GetDescendantWindow", "ATLWIN/ATL::CWindow::GetDlgControl", "ATLWIN/ATL::CWindow::GetDlgCtrlID", "ATLWIN/ATL::CWindow::GetDlgHost", "ATLWIN/ATL::CWindow::GetDlgItem", "ATLWIN/ATL::CWindow::GetDlgItemInt", "ATLWIN/ATL::CWindow::GetDlgItemText", "ATLWIN/ATL::CWindow::GetExStyle", "ATLWIN/ATL::CWindow::GetFont", "ATLWIN/ATL::CWindow::GetHotKey", "ATLWIN/ATL::CWindow::GetIcon", "ATLWIN/ATL::CWindow::GetLastActivePopup", "ATLWIN/ATL::CWindow::GetMenu", "ATLWIN/ATL::CWindow::GetNextDlgGroupItem", "ATLWIN/ATL::CWindow::GetNextDlgTabItem", "ATLWIN/ATL::CWindow::GetParent", "ATLWIN/ATL::CWindow::GetScrollInfo", "ATLWIN/ATL::CWindow::GetScrollPos", "ATLWIN/ATL::CWindow::GetScrollRange", "ATLWIN/ATL::CWindow::GetStyle", "ATLWIN/ATL::CWindow::GetSystemMenu", "ATLWIN/ATL::CWindow::GetTopLevelParent", "ATLWIN/ATL::CWindow::GetTopLevelWindow", "ATLWIN/ATL::CWindow::GetTopWindow", "ATLWIN/ATL::CWindow::GetUpdateRect", "ATLWIN/ATL::CWindow::GetUpdateRgn", "ATLWIN/ATL::CWindow::GetWindow", "ATLWIN/ATL::CWindow::GetWindowContextHelpId", "ATLWIN/ATL::CWindow::GetWindowDC", "ATLWIN/ATL::CWindow::GetWindowLong", "ATLWIN/ATL::CWindow::GetWindowLongPtr", "ATLWIN/ATL::CWindow::GetWindowPlacement", "ATLWIN/ATL::CWindow::GetWindowProcessID", "ATLWIN/ATL::CWindow::GetWindowRect", "ATLWIN/ATL::CWindow::GetWindowRgn", "ATLWIN/ATL::CWindow::GetWindowText", "ATLWIN/ATL::CWindow::GetWindowTextLength", "ATLWIN/ATL::CWindow::GetWindowThreadID", "ATLWIN/ATL::CWindow::GetWindowWord", "ATLWIN/ATL::CWindow::GotoDlgCtrl", "ATLWIN/ATL::CWindow::HideCaret", "ATLWIN/ATL::CWindow::HiliteMenuItem", "ATLWIN/ATL::CWindow::Invalidate", "ATLWIN/ATL::CWindow::InvalidateRect", "ATLWIN/ATL::CWindow::InvalidateRgn", "ATLWIN/ATL::CWindow::IsChild", "ATLWIN/ATL::CWindow::IsDialogMessage", "ATLWIN/ATL::CWindow::IsDlgButtonChecked", "ATLWIN/ATL::CWindow::IsIconic", "ATLWIN/ATL::CWindow::IsParentDialog", "ATLWIN/ATL::CWindow::IsWindow", "ATLWIN/ATL::CWindow::IsWindowEnabled", "ATLWIN/ATL::CWindow::IsWindowUnicode", "ATLWIN/ATL::CWindow::IsWindowVisible", "ATLWIN/ATL::CWindow::IsZoomed", "ATLWIN/ATL::CWindow::KillTimer", "ATLWIN/ATL::CWindow::LockWindowUpdate", "ATLWIN/ATL::CWindow::MapWindowPoints", "ATLWIN/ATL::CWindow::MessageBox", "ATLWIN/ATL::CWindow::ModifyStyle", "ATLWIN/ATL::CWindow::ModifyStyleEx", "ATLWIN/ATL::CWindow::MoveWindow", "ATLWIN/ATL::CWindow::NextDlgCtrl", "ATLWIN/ATL::CWindow::OpenClipboard", "ATLWIN/ATL::CWindow::PostMessage", "ATLWIN/ATL::CWindow::PrevDlgCtrl", "ATLWIN/ATL::CWindow::Print", "ATLWIN/ATL::CWindow::PrintClient", "ATLWIN/ATL::CWindow::RedrawWindow", "ATLWIN/ATL::CWindow::ReleaseDC", "ATLWIN/ATL::CWindow::ResizeClient", "ATLWIN/ATL::CWindow::ScreenToClient", "ATLWIN/ATL::CWindow::ScrollWindow", "ATLWIN/ATL::CWindow::ScrollWindowEx", "ATLWIN/ATL::CWindow::SendDlgItemMessage", "ATLWIN/ATL::CWindow::SendMessage", "ATLWIN/ATL::CWindow::SendMessageToDescendants", "ATLWIN/ATL::CWindow::SendNotifyMessage", "ATLWIN/ATL::CWindow::SetActiveWindow", "ATLWIN/ATL::CWindow::SetCapture", "ATLWIN/ATL::CWindow::SetClipboardViewer", "ATLWIN/ATL::CWindow::SetDlgCtrlID", "ATLWIN/ATL::CWindow::SetDlgItemInt", "ATLWIN/ATL::CWindow::SetDlgItemText", "ATLWIN/ATL::CWindow::SetFocus", "ATLWIN/ATL::CWindow::SetFont", "ATLWIN/ATL::CWindow::SetHotKey", "ATLWIN/ATL::CWindow::SetIcon", "ATLWIN/ATL::CWindow::SetMenu", "ATLWIN/ATL::CWindow::SetParent", "ATLWIN/ATL::CWindow::SetRedraw", "ATLWIN/ATL::CWindow::SetScrollInfo", "ATLWIN/ATL::CWindow::SetScrollPos", "ATLWIN/ATL::CWindow::SetScrollRange", "ATLWIN/ATL::CWindow::SetTimer", "ATLWIN/ATL::CWindow::SetWindowContextHelpId", "ATLWIN/ATL::CWindow::SetWindowLong", "ATLWIN/ATL::CWindow::SetWindowLongPtr", "ATLWIN/ATL::CWindow::SetWindowPlacement", "ATLWIN/ATL::CWindow::SetWindowPos", "ATLWIN/ATL::CWindow::SetWindowRgn", "ATLWIN/ATL::CWindow::SetWindowText", "ATLWIN/ATL::CWindow::SetWindowWord", "ATLWIN/ATL::CWindow::ShowCaret", "ATLWIN/ATL::CWindow::ShowOwnedPopups", "ATLWIN/ATL::CWindow::ShowScrollBar", "ATLWIN/ATL::CWindow::ShowWindow", "ATLWIN/ATL::CWindow::ShowWindowAsync", "ATLWIN/ATL::CWindow::UpdateWindow", "ATLWIN/ATL::CWindow::ValidateRect", "ATLWIN/ATL::CWindow::ValidateRgn", "ATLWIN/ATL::CWindow::WinHelp", "ATLWIN/ATL::CWindow::m_hWnd", "ATLWIN/ATL::CWindow::rcDefault"] helpviewer_keywords: ["CWindow class"] -ms.assetid: fefa00c8-f053-4bcf-87bc-dc84f5386683 --- -# CWindow Class +# `CWindow` Class This class provides methods for manipulating a window. @@ -25,206 +24,206 @@ class CWindow |Name|Description| |----------|-----------------| -|[CWindow::CWindow](#cwindow)|Constructor.| +|[`CWindow::CWindow`](#cwindow)|Constructor.| ### Public Methods |Name|Description| |----------|-----------------| -|[CWindow::ArrangeIconicWindows](#arrangeiconicwindows)|Arranges all minimized child windows.| -|[CWindow::Attach](#attach)|Attaches a window to the `CWindow` object.| -|[CWindow::BeginPaint](#beginpaint)|Prepares the window for painting.| -|[CWindow::BringWindowToTop](#bringwindowtotop)|Brings the window to the top of the Z order.| -|[CWindow::CenterWindow](#centerwindow)|Centers the window against a given window.| -|[CWindow::ChangeClipboardChain](#changeclipboardchain)|Removes the window from the chain of Clipboard viewers.| -|[CWindow::CheckDlgButton](#checkdlgbutton)|Changes the check state of the specified button.| -|[CWindow::CheckRadioButton](#checkradiobutton)|Checks the specified radio button.| -|[CWindow::ChildWindowFromPoint](#childwindowfrompoint)|Retrieves the child window containing the specified point.| -|[CWindow::ChildWindowFromPointEx](#childwindowfrompointex)|Retrieves a particular type of child window containing the specified point.| -|[CWindow::ClientToScreen](#clienttoscreen)|Converts client coordinates to screen coordinates.| -|[CWindow::Create](#create)|Creates a window.| -|[CWindow::CreateCaret](#createcaret)|Creates a new shape for the system caret.| -|[CWindow::CreateGrayCaret](#creategraycaret)|Creates a gray rectangle for the system caret.| -|[CWindow::CreateSolidCaret](#createsolidcaret)|Creates a solid rectangle for the system caret.| -|[CWindow::DeferWindowPos](#deferwindowpos)|Updates the specified multiple-window-position structure for the specified window.| -|[CWindow::DestroyWindow](#destroywindow)|Destroys the window associated with the `CWindow` object.| -|[CWindow::Detach](#detach)|Detaches the window from the `CWindow` object.| -|[CWindow::DlgDirList](#dlgdirlist)|Fills a list box with the names of all files matching a specified path or file name.| -|[CWindow::DlgDirListComboBox](#dlgdirlistcombobox)|Fills a combo box with the names of all files matching a specified path or file name.| -|[CWindow::DlgDirSelect](#dlgdirselect)|Retrieves the current selection from a list box.| -|[CWindow::DlgDirSelectComboBox](#dlgdirselectcombobox)|Retrieves the current selection from a combo box.| -|[CWindow::DragAcceptFiles](#dragacceptfiles)|Registers whether the window accepts dragged files.| -|[CWindow::DrawMenuBar](#drawmenubar)|Redraws the window's menu bar.| -|[CWindow::EnableScrollBar](#enablescrollbar)|Enables or disables the scroll bar arrows.| -|[CWindow::EnableWindow](#enablewindow)|Enables or disables input.| -|[CWindow::EndPaint](#endpaint)|Marks the end of painting.| -|[CWindow::FlashWindow](#flashwindow)|Flashes the window once.| -|[CWindow::GetClientRect](#getclientrect)|Retrieves the coordinates of the client area.| -|[CWindow::GetDC](#getdc)|Retrieves a device context for the client area.| -|[CWindow::GetDCEx](#getdcex)|Retrieves a device context for the client area and allows clipping options.| -|[CWindow::GetDescendantWindow](#getdescendantwindow)|Retrieves the specified descendant window.| -|[CWindow::GetDlgControl](#getdlgcontrol)|Retrieves an interface on the specified control.| -|[CWindow::GetDlgCtrlID](#getdlgctrlid)|Retrieves the window's identifier (for child windows only).| -|[CWindow::GetDlgHost](#getdlghost)|Retrieves a pointer to an interface to the ATL Control hosting container.| -|[CWindow::GetDlgItem](#getdlgitem)|Retrieves the specified child window.| -|[CWindow::GetDlgItemInt](#getdlgitemint)|Translates a control's text to an integer.| -|[CWindow::GetDlgItemText](#getdlgitemtext)|Retrieves a control's text.| -|[CWindow::GetExStyle](#getexstyle)|Retrieves the extended window styles.| -|[CWindow::GetFont](#getfont)|Retrieves the window's current font.| -|[CWindow::GetHotKey](#gethotkey)|Determines the hot key associated with the window.| -|[CWindow::GetIcon](#geticon)|Retrieves the window's large or small icon.| -|[CWindow::GetLastActivePopup](#getlastactivepopup)|Retrieves the most recently active pop-up window.| -|[CWindow::GetMenu](#getmenu)|Retrieves the window's menu.| -|[CWindow::GetNextDlgGroupItem](#getnextdlggroupitem)|Retrieves the previous or next control within a group of controls.| -|[CWindow::GetNextDlgTabItem](#getnextdlgtabitem)|Retrieves the previous or next control having the WS_TABSTOP style.| -|[CWindow::GetParent](#getparent)|Retrieves the immediate parent window.| -|[CWindow::GetScrollInfo](#getscrollinfo)|Retrieves the parameters of a scroll bar.| -|[CWindow::GetScrollPos](#getscrollpos)|Retrieves the position of the scroll box.| -|[CWindow::GetScrollRange](#getscrollrange)|Retrieves the scroll bar range.| -|[CWindow::GetStyle](#getstyle)|Retrieves the window styles.| -|[CWindow::GetSystemMenu](#getsystemmenu)|Creates a copy of the system menu for modification.| -|[CWindow::GetTopLevelParent](#gettoplevelparent)|Retrieves the top-level parent or owner window.| -|[CWindow::GetTopLevelWindow](#gettoplevelwindow)|Retrieves the top-level owner window.| -|[CWindow::GetTopWindow](#gettopwindow)|Retrieves the top-level child window.| -|[CWindow::GetUpdateRect](#getupdaterect)|Retrieves the coordinates of the smallest rectangle that completely encloses the update region.| -|[CWindow::GetUpdateRgn](#getupdatergn)|Retrieves the update region and copies it into a specified region.| -|[CWindow::GetWindow](#getwindow)|Retrieves the specified window.| -|[CWindow::GetWindowContextHelpId](#getwindowcontexthelpid)|Retrieves the window's help context identifier.| -|[CWindow::GetWindowDC](#getwindowdc)|Retrieves a device context for the entire window.| -|[CWindow::GetWindowLong](#getwindowlong)|Retrieves a 32-bit value at a specified offset into the extra window memory.| -|[CWindow::GetWindowLongPtr](#getwindowlongptr)|Retrieves information about the specified window, including a value at a specified offset into the extra window memory.| -|[CWindow::GetWindowPlacement](#getwindowplacement)|Retrieves the show state and positions.| -|[CWindow::GetWindowProcessID](#getwindowprocessid)|Retrieves the identifier of the process that created the window.| -|[CWindow::GetWindowRect](#getwindowrect)|Retrieves the window's bounding dimensions.| -|[CWindow::GetWindowRgn](#getwindowrgn)|Obtains a copy of the window region of a window.| -|[CWindow::GetWindowText](#getwindowtext)|Retrieves the window's text.| -|[CWindow::GetWindowTextLength](#getwindowtextlength)|Retrieves the length of the window's text.| -|[CWindow::GetWindowThreadID](#getwindowthreadid)|Retrieves the identifier of the thread that created the specified window.| -|[CWindow::GetWindowWord](#getwindowword)|Retrieves a 16-bit value at a specified offset into the extra window memory.| -|[CWindow::GotoDlgCtrl](#gotodlgctrl)|Sets the keyboard focus to a control in the dialog box.| -|[CWindow::HideCaret](#hidecaret)|Hides the system caret.| -|[CWindow::HiliteMenuItem](#hilitemenuitem)|Highlights or removes the highlight from a top-level menu item.| -|[CWindow::Invalidate](#invalidate)|Invalidates the entire client area.| -|[CWindow::InvalidateRect](#invalidaterect)|Invalidates the client area within the specified rectangle.| -|[CWindow::InvalidateRgn](#invalidatergn)|Invalidates the client area within the specified region.| -|[CWindow::IsChild](#ischild)|Determines whether the specified window is a child window.| -|[CWindow::IsDialogMessage](#isdialogmessage)|Determines whether a message is intended for the specified dialog box.| -|[CWindow::IsDlgButtonChecked](#isdlgbuttonchecked)|Determines the check state of the button.| -|[CWindow::IsIconic](#isiconic)|Determines whether the window is minimized.| -|[CWindow::IsParentDialog](#isparentdialog)|Determines if the parent window of a control is a dialog window.| -|[CWindow::IsWindow](#iswindow)|Determines whether the specified window handle identifies an existing window.| -|[CWindow::IsWindowEnabled](#iswindowenabled)|Determines whether the window is enabled for input.| -|[CWindow::IsWindowUnicode](#iswindowunicode)|Determines whether the specified window is a native Unicode window.| -|[CWindow::IsWindowVisible](#iswindowvisible)|Determines the window's visibility state.| -|[CWindow::IsZoomed](#iszoomed)|Determines whether the window is maximized.| -|[CWindow::KillTimer](#killtimer)|Destroys a timer event.| -|[CWindow::LockWindowUpdate](#lockwindowupdate)|Disables or enables drawing in the window.| -|[CWindow::MapWindowPoints](#mapwindowpoints)|Converts a set of points from the window's coordinate space to the coordinate space of another window.| -|[CWindow::MessageBox](#messagebox)|Displays a message box.| -|[CWindow::ModifyStyle](#modifystyle)|Modifies the window styles.| -|[CWindow::ModifyStyleEx](#modifystyleex)|Modifies the extended window styles.| -|[CWindow::MoveWindow](#movewindow)|Changes the window's size and position.| -|[CWindow::NextDlgCtrl](#nextdlgctrl)|Sets the keyboard focus to the next control in the dialog box.| -|[CWindow::OpenClipboard](#openclipboard)|Opens the Clipboard.| -|[CWindow::PostMessage](#postmessage)|Places a message in the message queue associated with the thread that created the window. Returns without waiting for the thread to process the message.| -|[CWindow::PrevDlgCtrl](#prevdlgctrl)|Sets the keyboard focus to the previous control in the dialog box.| -|[CWindow::Print](#print)|Requests that the window be drawn in a specified device context.| -|[CWindow::PrintClient](#printclient)|Requests that the window's client area be drawn in a specified device context.| -|[CWindow::RedrawWindow](#redrawwindow)|Updates a specified rectangle or region in the client area.| -|[CWindow::ReleaseDC](#releasedc)|Releases a device context.| -|[CWindow::ResizeClient](#resizeclient)|Resizes the window.| -|[CWindow::ScreenToClient](#screentoclient)|Converts screen coordinates to client coordinates.| -|[CWindow::ScrollWindow](#scrollwindow)|Scrolls the specified client area.| -|[CWindow::ScrollWindowEx](#scrollwindowex)|Scrolls the specified client area with additional features.| -|[CWindow::SendDlgItemMessage](#senddlgitemmessage)|Sends a message to a control.| -|[CWindow::SendMessage](#sendmessage)|Sends a message to the window and does not return until the window procedure has processed the message.| -|[CWindow::SendMessageToDescendants](#sendmessagetodescendants)|Sends a message to the specified descendant windows.| -|[CWindow::SendNotifyMessage](#sendnotifymessage)|Sends a message to the window. If the window was created by the calling thread, `SendNotifyMessage` does not return until the window procedure has processed the message. Otherwise, it returns immediately.| -|[CWindow::SetActiveWindow](#setactivewindow)|Activates the window.| -|[CWindow::SetCapture](#setcapture)|Sends all subsequent mouse input to the window.| -|[CWindow::SetClipboardViewer](#setclipboardviewer)|Adds the window to the Clipboard viewer chain.| -|[CWindow::SetDlgCtrlID](#setdlgctrlid)|Changes the window's identifier.| -|[CWindow::SetDlgItemInt](#setdlgitemint)|Changes a control's text to the string representation of an integer value.| -|[CWindow::SetDlgItemText](#setdlgitemtext)|Changes a control's text.| -|[CWindow::SetFocus](#setfocus)|Sets the input focus to the window.| -|[CWindow::SetFont](#setfont)|Changes the window's current font.| -|[CWindow::SetHotKey](#sethotkey)|Associates a hot key with the window.| -|[CWindow::SetIcon](#seticon)|Changes the window's large or small icon.| -|[CWindow::SetMenu](#setmenu)|Changes the window's current menu.| -|[CWindow::SetParent](#setparent)|Changes the parent window.| -|[CWindow::SetRedraw](#setredraw)|Sets or clears the redraw flag.| -|[CWindow::SetScrollInfo](#setscrollinfo)|Sets the parameters of a scroll bar.| -|[CWindow::SetScrollPos](#setscrollpos)|Changes the position of the scroll box.| -|[CWindow::SetScrollRange](#setscrollrange)|Changes the scroll bar range.| -|[CWindow::SetTimer](#settimer)|Creates a timer event.| -|[CWindow::SetWindowContextHelpId](#setwindowcontexthelpid)|Sets the window's help context identifier.| -|[CWindow::SetWindowLong](#setwindowlong)|Sets a 32-bit value at a specified offset into the extra window memory.| -|[CWindow::SetWindowLongPtr](#setwindowlongptr)|Changes an attribute of the specified window, and also sets a value at the specified offset in the extra window memory.| -|[CWindow::SetWindowPlacement](#setwindowplacement)|Sets the show state and positions.| -|[CWindow::SetWindowPos](#setwindowpos)|Sets the size, position, and Z order.| -|[CWindow::SetWindowRgn](#setwindowrgn)|Sets the window region of a window.| -|[CWindow::SetWindowText](#setwindowtext)|Changes the window's text.| -|[CWindow::SetWindowWord](#setwindowword)|Sets a 16-bit value at a specified offset into the extra window memory.| -|[CWindow::ShowCaret](#showcaret)|Displays the system caret.| -|[CWindow::ShowOwnedPopups](#showownedpopups)|Shows or hides the pop-up windows owned by the window.| -|[CWindow::ShowScrollBar](#showscrollbar)|Shows or hides a scroll bar.| -|[CWindow::ShowWindow](#showwindow)|Sets the window's show state.| -|[CWindow::ShowWindowAsync](#showwindowasync)|Sets the show state of a window created by a different thread.| -|[CWindow::UpdateWindow](#updatewindow)|Updates the client area.| -|[CWindow::ValidateRect](#validaterect)|Validates the client area within the specified rectangle.| -|[CWindow::ValidateRgn](#validatergn)|Validates the client area within the specified region.| -|[CWindow::WinHelp](#winhelp)|Starts Windows Help.| +|[`CWindow::ArrangeIconicWindows`](#arrangeiconicwindows)|Arranges all minimized child windows.| +|[`CWindow::Attach`](#attach)|Attaches a window to the `CWindow` object.| +|[`CWindow::BeginPaint`](#beginpaint)|Prepares the window for painting.| +|[`CWindow::BringWindowToTop`](#bringwindowtotop)|Brings the window to the top of the Z order.| +|[`CWindow::CenterWindow`](#centerwindow)|Centers the window against a given window.| +|[`CWindow::ChangeClipboardChain`](#changeclipboardchain)|Removes the window from the chain of Clipboard viewers.| +|[`CWindow::CheckDlgButton`](#checkdlgbutton)|Changes the check state of the specified button.| +|[`CWindow::CheckRadioButton`](#checkradiobutton)|Checks the specified radio button.| +|[`CWindow::ChildWindowFromPoint`](#childwindowfrompoint)|Retrieves the child window containing the specified point.| +|[`CWindow::ChildWindowFromPointEx`](#childwindowfrompointex)|Retrieves a particular type of child window containing the specified point.| +|[`CWindow::ClientToScreen`](#clienttoscreen)|Converts client coordinates to screen coordinates.| +|[`CWindow::Create`](#create)|Creates a window.| +|[`CWindow::CreateCaret`](#createcaret)|Creates a new shape for the system caret.| +|[`CWindow::CreateGrayCaret`](#creategraycaret)|Creates a gray rectangle for the system caret.| +|[`CWindow::CreateSolidCaret`](#createsolidcaret)|Creates a solid rectangle for the system caret.| +|[`CWindow::DeferWindowPos`](#deferwindowpos)|Updates the specified multiple-window-position structure for the specified window.| +|[`CWindow::DestroyWindow`](#destroywindow)|Destroys the window associated with the `CWindow` object.| +|[`CWindow::Detach`](#detach)|Detaches the window from the `CWindow` object.| +|[`CWindow::DlgDirList`](#dlgdirlist)|Fills a list box with the names of all files matching a specified path or file name.| +|[`CWindow::DlgDirListComboBox`](#dlgdirlistcombobox)|Fills a combo box with the names of all files matching a specified path or file name.| +|[`CWindow::DlgDirSelect`](#dlgdirselect)|Retrieves the current selection from a list box.| +|[`CWindow::DlgDirSelectComboBox`](#dlgdirselectcombobox)|Retrieves the current selection from a combo box.| +|[`CWindow::DragAcceptFiles`](#dragacceptfiles)|Registers whether the window accepts dragged files.| +|[`CWindow::DrawMenuBar`](#drawmenubar)|Redraws the window's menu bar.| +|[`CWindow::EnableScrollBar`](#enablescrollbar)|Enables or disables the scroll bar arrows.| +|[`CWindow::EnableWindow`](#enablewindow)|Enables or disables input.| +|[`CWindow::EndPaint`](#endpaint)|Marks the end of painting.| +|[`CWindow::FlashWindow`](#flashwindow)|Flashes the window once.| +|[`CWindow::GetClientRect`](#getclientrect)|Retrieves the coordinates of the client area.| +|[`CWindow::GetDC`](#getdc)|Retrieves a device context for the client area.| +|[`CWindow::GetDCEx`](#getdcex)|Retrieves a device context for the client area and allows clipping options.| +|[`CWindow::GetDescendantWindow`](#getdescendantwindow)|Retrieves the specified descendant window.| +|[`CWindow::GetDlgControl`](#getdlgcontrol)|Retrieves an interface on the specified control.| +|[`CWindow::GetDlgCtrlID`](#getdlgctrlid)|Retrieves the window's identifier (for child windows only).| +|[`CWindow::GetDlgHost`](#getdlghost)|Retrieves a pointer to an interface to the ATL Control hosting container.| +|[`CWindow::GetDlgItem`](#getdlgitem)|Retrieves the specified child window.| +|[`CWindow::GetDlgItemInt`](#getdlgitemint)|Translates a control's text to an integer.| +|[`CWindow::GetDlgItemText`](#getdlgitemtext)|Retrieves a control's text.| +|[`CWindow::GetExStyle`](#getexstyle)|Retrieves the extended window styles.| +|[`CWindow::GetFont`](#getfont)|Retrieves the window's current font.| +|[`CWindow::GetHotKey`](#gethotkey)|Determines the hot key associated with the window.| +|[`CWindow::GetIcon`](#geticon)|Retrieves the window's large or small icon.| +|[`CWindow::GetLastActivePopup`](#getlastactivepopup)|Retrieves the most recently active pop-up window.| +|[`CWindow::GetMenu`](#getmenu)|Retrieves the window's menu.| +|[`CWindow::GetNextDlgGroupItem`](#getnextdlggroupitem)|Retrieves the previous or next control within a group of controls.| +|[`CWindow::GetNextDlgTabItem`](#getnextdlgtabitem)|Retrieves the previous or next control having the `WS_TABSTOP` style.| +|[`CWindow::GetParent`](#getparent)|Retrieves the immediate parent window.| +|[`CWindow::GetScrollInfo`](#getscrollinfo)|Retrieves the parameters of a scroll bar.| +|[`CWindow::GetScrollPos`](#getscrollpos)|Retrieves the position of the scroll box.| +|[`CWindow::GetScrollRange`](#getscrollrange)|Retrieves the scroll bar range.| +|[`CWindow::GetStyle`](#getstyle)|Retrieves the window styles.| +|[`CWindow::GetSystemMenu`](#getsystemmenu)|Creates a copy of the system menu for modification.| +|[`CWindow::GetTopLevelParent`](#gettoplevelparent)|Retrieves the top-level parent or owner window.| +|[`CWindow::GetTopLevelWindow`](#gettoplevelwindow)|Retrieves the top-level owner window.| +|[`CWindow::GetTopWindow`](#gettopwindow)|Retrieves the top-level child window.| +|[`CWindow::GetUpdateRect`](#getupdaterect)|Retrieves the coordinates of the smallest rectangle that completely encloses the update region.| +|[`CWindow::GetUpdateRgn`](#getupdatergn)|Retrieves the update region and copies it into a specified region.| +|[`CWindow::GetWindow`](#getwindow)|Retrieves the specified window.| +|[`CWindow::GetWindowContextHelpId`](#getwindowcontexthelpid)|Retrieves the window's help context identifier.| +|[`CWindow::GetWindowDC`](#getwindowdc)|Retrieves a device context for the entire window.| +|[`CWindow::GetWindowLong`](#getwindowlong)|Retrieves a 32-bit value at a specified offset into the extra window memory.| +|[`CWindow::GetWindowLongPtr`](#getwindowlongptr)|Retrieves information about the specified window, including a value at a specified offset into the extra window memory.| +|[`CWindow::GetWindowPlacement`](#getwindowplacement)|Retrieves the show state and positions.| +|[`CWindow::GetWindowProcessID`](#getwindowprocessid)|Retrieves the identifier of the process that created the window.| +|[`CWindow::GetWindowRect`](#getwindowrect)|Retrieves the window's bounding dimensions.| +|[`CWindow::GetWindowRgn`](#getwindowrgn)|Obtains a copy of the window region of a window.| +|[`CWindow::GetWindowText`](#getwindowtext)|Retrieves the window's text.| +|[`CWindow::GetWindowTextLength`](#getwindowtextlength)|Retrieves the length of the window's text.| +|[`CWindow::GetWindowThreadID`](#getwindowthreadid)|Retrieves the identifier of the thread that created the specified window.| +|[`CWindow::GetWindowWord`](#getwindowword)|Retrieves a 16-bit value at a specified offset into the extra window memory.| +|[`CWindow::GotoDlgCtrl`](#gotodlgctrl)|Sets the keyboard focus to a control in the dialog box.| +|[`CWindow::HideCaret`](#hidecaret)|Hides the system caret.| +|[`CWindow::HiliteMenuItem`](#hilitemenuitem)|Highlights or removes the highlight from a top-level menu item.| +|[`CWindow::Invalidate`](#invalidate)|Invalidates the entire client area.| +|[`CWindow::InvalidateRect`](#invalidaterect)|Invalidates the client area within the specified rectangle.| +|[`CWindow::InvalidateRgn`](#invalidatergn)|Invalidates the client area within the specified region.| +|[`CWindow::IsChild`](#ischild)|Determines whether the specified window is a child window.| +|[`CWindow::IsDialogMessage`](#isdialogmessage)|Determines whether a message is intended for the specified dialog box.| +|[`CWindow::IsDlgButtonChecked`](#isdlgbuttonchecked)|Determines the check state of the button.| +|[`CWindow::IsIconic`](#isiconic)|Determines whether the window is minimized.| +|[`CWindow::IsParentDialog`](#isparentdialog)|Determines if the parent window of a control is a dialog window.| +|[`CWindow::IsWindow`](#iswindow)|Determines whether the specified window handle identifies an existing window.| +|[`CWindow::IsWindowEnabled`](#iswindowenabled)|Determines whether the window is enabled for input.| +|[`CWindow::IsWindowUnicode`](#iswindowunicode)|Determines whether the specified window is a native Unicode window.| +|[`CWindow::IsWindowVisible`](#iswindowvisible)|Determines the window's visibility state.| +|[`CWindow::IsZoomed`](#iszoomed)|Determines whether the window is maximized.| +|[`CWindow::KillTimer`](#killtimer)|Destroys a timer event.| +|[`CWindow::LockWindowUpdate`](#lockwindowupdate)|Disables or enables drawing in the window.| +|[`CWindow::MapWindowPoints`](#mapwindowpoints)|Converts a set of points from the window's coordinate space to the coordinate space of another window.| +|[`CWindow::MessageBox`](#messagebox)|Displays a message box.| +|[`CWindow::ModifyStyle`](#modifystyle)|Modifies the window styles.| +|[`CWindow::ModifyStyleEx`](#modifystyleex)|Modifies the extended window styles.| +|[`CWindow::MoveWindow`](#movewindow)|Changes the window's size and position.| +|[`CWindow::NextDlgCtrl`](#nextdlgctrl)|Sets the keyboard focus to the next control in the dialog box.| +|[`CWindow::OpenClipboard`](#openclipboard)|Opens the Clipboard.| +|[`CWindow::PostMessage`](#postmessage)|Places a message in the message queue associated with the thread that created the window. Returns without waiting for the thread to process the message.| +|[`CWindow::PrevDlgCtrl`](#prevdlgctrl)|Sets the keyboard focus to the previous control in the dialog box.| +|[`CWindow::Print`](#print)|Requests that the window be drawn in a specified device context.| +|[`CWindow::PrintClient`](#printclient)|Requests that the window's client area be drawn in a specified device context.| +|[`CWindow::RedrawWindow`](#redrawwindow)|Updates a specified rectangle or region in the client area.| +|[`CWindow::ReleaseDC`](#releasedc)|Releases a device context.| +|[`CWindow::ResizeClient`](#resizeclient)|Resizes the window.| +|[`CWindow::ScreenToClient`](#screentoclient)|Converts screen coordinates to client coordinates.| +|[`CWindow::ScrollWindow`](#scrollwindow)|Scrolls the specified client area.| +|[`CWindow::ScrollWindowEx`](#scrollwindowex)|Scrolls the specified client area with additional features.| +|[`CWindow::SendDlgItemMessage`](#senddlgitemmessage)|Sends a message to a control.| +|[`CWindow::SendMessage`](#sendmessage)|Sends a message to the window and doesn't return until the window procedure has processed the message.| +|[`CWindow::SendMessageToDescendants`](#sendmessagetodescendants)|Sends a message to the specified descendant windows.| +|[`CWindow::SendNotifyMessage`](#sendnotifymessage)|Sends a message to the window. If the window was created by the calling thread, `SendNotifyMessage` doesn't return until the window procedure has processed the message. Otherwise, it returns immediately.| +|[`CWindow::SetActiveWindow`](#setactivewindow)|Activates the window.| +|[`CWindow::SetCapture`](#setcapture)|Sends all subsequent mouse input to the window.| +|[`CWindow::SetClipboardViewer`](#setclipboardviewer)|Adds the window to the Clipboard viewer chain.| +|[`CWindow::SetDlgCtrlID`](#setdlgctrlid)|Changes the window's identifier.| +|[`CWindow::SetDlgItemInt`](#setdlgitemint)|Changes a control's text to the string representation of an integer value.| +|[`CWindow::SetDlgItemText`](#setdlgitemtext)|Changes a control's text.| +|[`CWindow::SetFocus`](#setfocus)|Sets the input focus to the window.| +|[`CWindow::SetFont`](#setfont)|Changes the window's current font.| +|[`CWindow::SetHotKey`](#sethotkey)|Associates a hot key with the window.| +|[`CWindow::SetIcon`](#seticon)|Changes the window's large or small icon.| +|[`CWindow::SetMenu`](#setmenu)|Changes the window's current menu.| +|[`CWindow::SetParent`](#setparent)|Changes the parent window.| +|[`CWindow::SetRedraw`](#setredraw)|Sets or clears the redraw flag.| +|[`CWindow::SetScrollInfo`](#setscrollinfo)|Sets the parameters of a scroll bar.| +|[`CWindow::SetScrollPos`](#setscrollpos)|Changes the position of the scroll box.| +|[`CWindow::SetScrollRange`](#setscrollrange)|Changes the scroll bar range.| +|[`CWindow::SetTimer`](#settimer)|Creates a timer event.| +|[`CWindow::SetWindowContextHelpId`](#setwindowcontexthelpid)|Sets the window's help context identifier.| +|[`CWindow::SetWindowLong`](#setwindowlong)|Sets a 32-bit value at a specified offset into the extra window memory.| +|[`CWindow::SetWindowLongPtr`](#setwindowlongptr)|Changes an attribute of the specified window, and also sets a value at the specified offset in the extra window memory.| +|[`CWindow::SetWindowPlacement`](#setwindowplacement)|Sets the show state and positions.| +|[`CWindow::SetWindowPos`](#setwindowpos)|Sets the size, position, and Z order.| +|[`CWindow::SetWindowRgn`](#setwindowrgn)|Sets the window region of a window.| +|[`CWindow::SetWindowText`](#setwindowtext)|Changes the window's text.| +|[`CWindow::SetWindowWord`](#setwindowword)|Sets a 16-bit value at a specified offset into the extra window memory.| +|[`CWindow::ShowCaret`](#showcaret)|Displays the system caret.| +|[`CWindow::ShowOwnedPopups`](#showownedpopups)|Shows or hides the pop-up windows owned by the window.| +|[`CWindow::ShowScrollBar`](#showscrollbar)|Shows or hides a scroll bar.| +|[`CWindow::ShowWindow`](#showwindow)|Sets the window's show state.| +|[`CWindow::ShowWindowAsync`](#showwindowasync)|Sets the show state of a window created by a different thread.| +|[`CWindow::UpdateWindow`](#updatewindow)|Updates the client area.| +|[`CWindow::ValidateRect`](#validaterect)|Validates the client area within the specified rectangle.| +|[`CWindow::ValidateRgn`](#validatergn)|Validates the client area within the specified region.| +|[`CWindow::WinHelp`](#winhelp)|Starts Windows Help.| ### Public Operators |Name|Description| |----------|-----------------| -|[CWindow::operator HWND](#operator_hwnd)|Converts the `CWindow` object to an HWND.| -|[CWindow::operator =](#operator_eq)|Assigns an HWND to the `CWindow` object.| +|[`CWindow::operator HWND`](#operator_hwnd)|Converts the `CWindow` object to an `HWND`.| +|[`CWindow::operator =`](#operator_eq)|Assigns an `HWND` to the `CWindow` object.| ### Public Data Members |Name|Description| |----------|-----------------| -|[CWindow::m_hWnd](#m_hwnd)|The handle to the window associated with the `CWindow` object.| -|[CWindow::rcDefault](#rcdefault)|Contains default window dimensions.| +|[`CWindow::m_hWnd`](#m_hwnd)|The handle to the window associated with the `CWindow` object.| +|[`CWindow::rcDefault`](#rcdefault)|Contains default window dimensions.| ## Remarks `CWindow` provides the base functionality for manipulating a window in ATL. Many of the `CWindow` methods simply wrap one of the Win32 API functions. For example, compare the prototypes for `CWindow::ShowWindow` and `ShowWindow`: -|CWindow method|Win32 function| -|--------------------|--------------------| -|**BOOL ShowWindow( int** `nCmdShow` **);**|**BOOL ShowWindow( HWND** `hWnd` **, int** `nCmdShow` **);**| +| CWindow method | Win32 function | +|--|--| +| `BOOL ShowWindow( int nCmdShow );` | `BOOL ShowWindow( HWND hWnd , int nCmdShow );` | `CWindow::ShowWindow` calls the Win32 function `ShowWindow` by passing `CWindow::m_hWnd` as the first parameter. Every `CWindow` method that directly wraps a Win32 function passes the `m_hWnd` member; therefore, much of the `CWindow` documentation will refer you to the Windows SDK. > [!NOTE] > Not every window-related Win32 function is wrapped by `CWindow`, and not every `CWindow` method wraps a Win32 function. -`CWindow::m_hWnd` stores the HWND that identifies a window. An HWND is attached to your object when you: +`CWindow::m_hWnd` stores the `HWND` that identifies a window. An `HWND` is attached to your object when you: -- Specify an HWND in `CWindow`'s constructor. +- Specify an `HWND` in `CWindow`'s constructor. - Call `CWindow::Attach`. -- Use `CWindow`'s **operator =**. +- Use `CWindow`'s **`operator =`**. - Create or subclass a window using one of the following classes derived from `CWindow`: -[CWindowImpl](../../atl/reference/cwindowimpl-class.md) Allows you to create a new window or subclass an existing window. +[`CWindowImpl`](../../atl/reference/cwindowimpl-class.md) Allows you to create a new window or subclass an existing window. -[CContainedWindow](../../atl/reference/ccontainedwindowt-class.md) Implements a window contained within another object. You can create a new window or subclass an existing window. +[`CContainedWindow`](../../atl/reference/ccontainedwindowt-class.md) Implements a window contained within another object. You can create a new window or subclass an existing window. -[CDialogImpl](../../atl/reference/cdialogimpl-class.md) Allows you to create a modal or modeless dialog box. +[`CDialogImpl`](../../atl/reference/cdialogimpl-class.md) Allows you to create a modal or modeless dialog box. For more information about windows, see [Windows](/windows/win32/winmsg/windows) and subsequent topics in the Windows SDK. For more information about using windows in ATL, see the article [ATL Window Classes](../../atl/atl-window-classes.md). ## Requirements -**Header:** atlwin.h +**Header:** `atlwin.h` -## CWindow::ArrangeIconicWindows +## `CWindow::ArrangeIconicWindows` Arranges all minimized child windows. @@ -234,11 +233,11 @@ UINT ArrangeIconicWindows() throw(); ### Remarks -See [ArrangeIconicWindows](/windows/win32/api/winuser/nf-winuser-arrangeiconicwindows) in the Windows SDK. +See [`ArrangeIconicWindows`](/windows/win32/api/winuser/nf-winuser-arrangeiconicwindows) in the Windows SDK. -## CWindow::Attach +## `CWindow::Attach` -Attaches the window identified by *hWndNew* to the `CWindow` object. +Attaches the window identified by *`hWndNew`* to the `CWindow` object. ```cpp void Attach(HWND hWndNew) throw(); @@ -246,14 +245,14 @@ void Attach(HWND hWndNew) throw(); ### Parameters -*hWndNew*
+*`hWndNew`*\ [in] The handle to a window. ### Example [!code-cpp[NVC_ATL_Windowing#1](../../atl/codesnippet/cpp/cwindow-class_1.cpp)] -## CWindow::BeginPaint +## `CWindow::BeginPaint` Prepares the window for painting. @@ -263,13 +262,13 @@ HDC BeginPaint(LPPAINTSTRUCT lpPaint) throw(); ### Remarks -See [BeginPaint](/windows/win32/api/winuser/nf-winuser-beginpaint) in the Windows SDK. +See [`BeginPaint`](/windows/win32/api/winuser/nf-winuser-beginpaint) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#2](../../atl/codesnippet/cpp/cwindow-class_2.cpp)] -## CWindow::BringWindowToTop +## `CWindow::BringWindowToTop` Brings the window to the top of the Z order. @@ -279,13 +278,13 @@ BOOL BringWindowToTop() throw(); ### Remarks -See [BringWindowToTop](/windows/win32/api/winuser/nf-winuser-bringwindowtotop) in the Windows SDK. +See [`BringWindowToTop`](/windows/win32/api/winuser/nf-winuser-bringwindowtotop) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#3](../../atl/codesnippet/cpp/cwindow-class_3.cpp)] -## CWindow::CenterWindow +## `CWindow::CenterWindow` Centers the window against a given window. @@ -295,18 +294,18 @@ BOOL CenterWindow(HWND hWndCenter = NULL) throw(); ### Parameters -*hWndCenter*
-[in] The handle to the window against which to center. If this parameter is NULL (the default value), the method will set *hWndCenter* to the window's parent window if it is a child window. Otherwise, it will set *hWndCenter* to the window's owner window. +*`hWndCenter`*\ +[in] The handle to the window against which to center. If this parameter is `NULL` (the default value), the method will set *`hWndCenter`* to the window's parent window if it's a child window. Otherwise, it will set *`hWndCenter`* to the window's owner window. ### Return Value -TRUE if the window is successfully centered; otherwise, FALSE. +`TRUE` if the window is successfully centered; otherwise, `FALSE`. ### Example [!code-cpp[NVC_ATL_Windowing#4](../../atl/codesnippet/cpp/cwindow-class_4.cpp)] -## CWindow::ChangeClipboardChain +## `CWindow::ChangeClipboardChain` Removes the window from the chain of Clipboard viewers. @@ -316,9 +315,9 @@ BOOL ChangeClipboardChain(HWND hWndNewNext) throw(); ### Remarks -See [ChangeClipboardChain](/windows/win32/api/winuser/nf-winuser-changeclipboardchain) in the Windows SDK. +See [`ChangeClipboardChain`](/windows/win32/api/winuser/nf-winuser-changeclipboardchain) in the Windows SDK. -## CWindow::CheckDlgButton +## `CWindow::CheckDlgButton` Changes the check state of the specified button. @@ -328,9 +327,9 @@ BOOL CheckDlgButton(int nIDButton, UINT nCheck) throw(); ### Remarks -See [CheckDlgButton](/windows/win32/api/winuser/nf-winuser-checkdlgbutton) in the Windows SDK. +See [`CheckDlgButton`](/windows/win32/api/winuser/nf-winuser-checkdlgbutton) in the Windows SDK. -## CWindow::CheckRadioButton +## `CWindow::CheckRadioButton` Checks the specified radio button. @@ -343,9 +342,9 @@ BOOL CheckRadioButton( ### Remarks -See [CheckRadioButton](/windows/win32/api/winuser/nf-winuser-checkradiobutton) in the Windows SDK. +See [`CheckRadioButton`](/windows/win32/api/winuser/nf-winuser-checkradiobutton) in the Windows SDK. -## CWindow::ChildWindowFromPoint +## `CWindow::ChildWindowFromPoint` Retrieves the child window containing the specified point. @@ -355,9 +354,9 @@ HWND ChildWindowFromPoint(POINT point) const throw(); ### Remarks -See [ChildWindowFromPoint](/windows/win32/api/winuser/nf-winuser-childwindowfrompoint) in the Windows SDK. +See [`ChildWindowFromPoint`](/windows/win32/api/winuser/nf-winuser-childwindowfrompoint) in the Windows SDK. -## CWindow::ChildWindowFromPointEx +## `CWindow::ChildWindowFromPointEx` Retrieves a particular type of child window containing the specified point. @@ -367,9 +366,9 @@ HWND ChildWindowFromPoint(POINT point, UINT uFlags) const throw(); ### Remarks -See [ChildWindowFromPointEx](/windows/win32/api/winuser/nf-winuser-childwindowfrompointex) in the Windows SDK. +See [`ChildWindowFromPointEx`](/windows/win32/api/winuser/nf-winuser-childwindowfrompointex) in the Windows SDK. -## CWindow::ClientToScreen +## `CWindow::ClientToScreen` Converts client coordinates to screen coordinates. @@ -380,11 +379,11 @@ BOOL ClientToScreen(LPRECT lpRect) const throw(); ### Remarks -See [ClientToScreen](/windows/win32/api/winuser/nf-winuser-clienttoscreen) in the Windows SDK. +See [`ClientToScreen`](/windows/win32/api/winuser/nf-winuser-clienttoscreen) in the Windows SDK. -The second version of this method allows you to convert the coordinates of a [RECT](/windows/win32/api/windef/ns-windef-rect) structure. +The second version of this method allows you to convert the coordinates of a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure. -## CWindow::Create +## `CWindow::Create` Creates a window. @@ -402,43 +401,43 @@ HWND Create( ### Parameters -*lpstrWndClass*
+*`lpstrWndClass`*\ [in] A pointer to the window's class. -*hWndParent*
+*`hWndParent`*\ [in] The handle to the parent or owner window. -*rect*
-[in] A variable of type [_U_RECT](../../atl/reference/u-rect-class.md) specifying the position of the window. The default value is NULL. When this parameter is NULL, the value of `CWindow::rcDefault` is used. +*`rect`*\ +[in] A variable of type [`_U_RECT`](../../atl/reference/u-rect-class.md) specifying the position of the window. The default value is `NULL`. When this parameter is `NULL`, the value of `CWindow::rcDefault` is used. -*szWindowName*
-[in] Specifies the name of the window. The default value is NULL. +*`szWindowName`*\ +[in] Specifies the name of the window. The default value is `NULL`. -*dwStyle*
-[in] The style of the window. The default value is 0, meaning no style is specified. For a list of possible values, see [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK. +*`dwStyle`*\ +[in] The style of the window. The default value is 0, meaning no style is specified. For a list of possible values, see [`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK. -*dwExStyle*
-[in] The extended window style. The default value is 0, meaning no extended style is specified. For a list of possible values, see [CreateWindowEx](/windows/win32/api/winuser/nf-winuser-createwindowexw) in the Windows SDK. +*`dwExStyle`*\ +[in] The extended window style. The default value is 0, meaning no extended style is specified. For a list of possible values, see [`CreateWindowEx`](/windows/win32/api/winuser/nf-winuser-createwindowexw) in the Windows SDK. -*MenuOrID*
-[in] A variable of type [_U_MENUorID](../../atl/reference/u-menuorid-class.md) specifying a handle to a menu or a window identifier. The default value is 0U. +*`MenuOrID`*\ +[in] A variable of type [`_U_MENUorID`](../../atl/reference/u-menuorid-class.md) specifying a handle to a menu or a window identifier. The default value is `0U`. -*lpCreateParam*
-A pointer to the window-creation data contained in a [CREATESTRUCT](/windows/win32/api/winuser/ns-winuser-createstructw) structure. +*`lpCreateParam`*\ +A pointer to the window-creation data contained in a [`CREATESTRUCT`](/windows/win32/api/winuser/ns-winuser-createstructw) structure. ### Return Value -If successful, the handle to the newly created window, specified by [m_hWnd](#m_hwnd). Otherwise, NULL. +If successful, the handle to the newly created window, specified by [`m_hWnd`](#m_hwnd). Otherwise, `NULL`. ### Remarks `CWindow::rcDefault` is defined as `__declspec(selectany) RECT CWindow::rcDefault = {CW_USEDEFAULT, CW_USEDEFAULT, 0, 0};`. -See [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK for more information. +See [`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww) in the Windows SDK for more information. -**Note** If 0 is used as the value for the *MenuOrID* parameter, it must be specified as 0U (the default value) to avoid a compiler error. +**Note** If 0 is used as the value for the *`MenuOrID`* parameter, it must be specified as `0U` (the default value) to avoid a compiler error. -## CWindow::CreateCaret +## `CWindow::CreateCaret` Creates a new shape for the system caret. @@ -448,9 +447,9 @@ BOOL CreateCaret(HBITMAP pBitmap) throw(); ### Remarks -See [CreateCaret](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK. +See [`CreateCaret`](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK. -## CWindow::CreateGrayCaret +## `CWindow::CreateGrayCaret` Creates a gray rectangle for the system caret. @@ -460,11 +459,11 @@ BOOL CreateGrayCaret(int nWidth, int nHeight) throw(); ### Remarks -See [CreateCaret](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK. +See [`CreateCaret`](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK. -Passes (HBITMAP) 1 for the bitmap handle parameter to the Win32 function. +Passes `(HBITMAP) 1` for the bitmap handle parameter to the Win32 function. -## CWindow::CreateSolidCaret +## `CWindow::CreateSolidCaret` Creates a solid rectangle for the system caret. @@ -474,11 +473,11 @@ BOOL CreateSolidCaret(int nWidth, int nHeight) throw(); ### Remarks -See [CreateCaret](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK. +See [`CreateCaret`](/windows/win32/api/winuser/nf-winuser-createcaret) in the Windows SDK. -Passes (HBITMAP) 0 for the bitmap handle parameter to the Win32 function. +Passes `(HBITMAP) 0` for the bitmap handle parameter to the Win32 function. -## CWindow::CWindow +## `CWindow::CWindow` The constructor. @@ -488,17 +487,17 @@ CWindow(HWND hWnd = NULL) throw(); ### Parameters -*hWnd*
+*`hWnd`*\ [in] The handle to a window. ### Remarks -Initializes the [m_hWnd](#m_hwnd) member to *hWnd*, which by default is NULL. +Initializes the [`m_hWnd`](#m_hwnd) member to *`hWnd`*, which by default is `NULL`. > [!NOTE] -> `CWindow::CWindow` does not create a window. Classes [CWindowImpl](../../atl/reference/cwindowimpl-class.md), [CContainedWindow](../../atl/reference/ccontainedwindowt-class.md), and [CDialogImpl](../../atl/reference/cdialogimpl-class.md) (all of which derive from `CWindow`) provide a method to create a window or dialog box, which is then assigned to `CWindow::m_hWnd`. You can also use the [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) Win32 function. +> `CWindow::CWindow` does not create a window. Classes [`CWindowImpl`](../../atl/reference/cwindowimpl-class.md), [`CContainedWindow`](../../atl/reference/ccontainedwindowt-class.md), and [`CDialogImpl`](../../atl/reference/cdialogimpl-class.md) (all of which derive from `CWindow`) provide a method to create a window or dialog box, which is then assigned to `CWindow::m_hWnd`. You can also use the [`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww) Win32 function. -## CWindow::DeferWindowPos +## `CWindow::DeferWindowPos` Updates the specified multiple-window-position structure for the specified window. @@ -515,11 +514,11 @@ HDWP DeferWindowPos( ### Remarks -See [DeferWindowPos](/windows/win32/api/winuser/nf-winuser-deferwindowpos) in the Windows SDK. +See [`DeferWindowPos`](/windows/win32/api/winuser/nf-winuser-deferwindowpos) in the Windows SDK. -## CWindow::DestroyWindow +## `CWindow::DestroyWindow` -Destroys the window associated with the `CWindow` object and sets [m_hWnd](#m_hwnd) to NULL. +Destroys the window associated with the `CWindow` object and sets [`m_hWnd`](#m_hwnd) to `NULL`. ``` BOOL DestroyWindow() throw(); @@ -527,17 +526,17 @@ BOOL DestroyWindow() throw(); ### Remarks -See [DestroyWindow](/windows/win32/api/winuser/nf-winuser-destroywindow) in the Windows SDK. +See [`DestroyWindow`](/windows/win32/api/winuser/nf-winuser-destroywindow) in the Windows SDK. -It does not destroy the `CWindow` object itself. +It doesn't destroy the `CWindow` object itself. ### Example [!code-cpp[NVC_ATL_Windowing#5](../../atl/codesnippet/cpp/cwindow-class_5.cpp)] -## CWindow::Detach +## `CWindow::Detach` -Detaches [m_hWnd](#m_hwnd) from the `CWindow` object and sets `m_hWnd` to NULL. +Detaches [`m_hWnd`](#m_hwnd) from the `CWindow` object and sets `m_hWnd` to `NULL`. ``` HWND Detach() throw(); @@ -545,13 +544,13 @@ HWND Detach() throw(); ### Return Value -The HWND associated with the `CWindow` object. +The `HWND` associated with the `CWindow` object. ### Example [!code-cpp[NVC_ATL_Windowing#6](../../atl/codesnippet/cpp/cwindow-class_6.cpp)] -## CWindow::DlgDirList +## `CWindow::DlgDirList` Fills a list box with the names of all files matching a specified path or file name. @@ -565,9 +564,9 @@ int DlgDirList( ### Remarks -See [DlgDirList](/windows/win32/api/winuser/nf-winuser-dlgdirlistw) in the Windows SDK. +See [`DlgDirList`](/windows/win32/api/winuser/nf-winuser-dlgdirlistw) in the Windows SDK. -## CWindow::DlgDirListComboBox +## `CWindow::DlgDirListComboBox` Fills a combo box with the names of all files matching a specified path or file name. @@ -581,9 +580,9 @@ int DlgDirListComboBox( ### Remarks -See [DlgDirListComboBox](/windows/win32/api/winuser/nf-winuser-dlgdirlistcomboboxw) in the Windows SDK. +See [`DlgDirListComboBox`](/windows/win32/api/winuser/nf-winuser-dlgdirlistcomboboxw) in the Windows SDK. -## CWindow::DlgDirSelect +## `CWindow::DlgDirSelect` Retrieves the current selection from a list box. @@ -596,9 +595,9 @@ BOOL DlgDirSelect( ### Remarks -See [DlgDirSelectEx](/windows/win32/api/winuser/nf-winuser-dlgdirselectexw) in the Windows SDK. +See [`DlgDirSelectEx`](/windows/win32/api/winuser/nf-winuser-dlgdirselectexw) in the Windows SDK. -## CWindow::DlgDirSelectComboBox +## `CWindow::DlgDirSelectComboBox` Retrieves the current selection from a combo box. @@ -611,9 +610,9 @@ BOOL DlgDirSelectComboBox( ### Remarks -See [DlgDirSelectComboBoxEx](/windows/win32/api/winuser/nf-winuser-dlgdirselectcomboboxexw) in the Windows SDK. +See [`DlgDirSelectComboBoxEx`](/windows/win32/api/winuser/nf-winuser-dlgdirselectcomboboxexw) in the Windows SDK. -## CWindow::DragAcceptFiles +## `CWindow::DragAcceptFiles` Registers whether the window accepts dragged files. @@ -623,9 +622,9 @@ void DragAcceptFiles(BOOL bAccept = TRUE); ### Remarks -See [DragAcceptFiles](/windows/win32/api/shellapi/nf-shellapi-dragacceptfiles) in the Windows SDK. +See [`DragAcceptFiles`](/windows/win32/api/shellapi/nf-shellapi-dragacceptfiles) in the Windows SDK. -## CWindow::DrawMenuBar +## `CWindow::DrawMenuBar` Redraws the window's menu bar. @@ -635,9 +634,9 @@ BOOL DrawMenuBar() throw(); ### Remarks -See [DrawMenuBar](/windows/win32/api/winuser/nf-winuser-drawmenubar) in the Windows SDK. +See [`DrawMenuBar`](/windows/win32/api/winuser/nf-winuser-drawmenubar) in the Windows SDK. -## CWindow::EnableScrollBar +## `CWindow::EnableScrollBar` Enables or disables the scroll bar arrows. @@ -647,9 +646,9 @@ BOOL EnableScrollBar(UINT uSBFlags, UINT uArrowFlags = ESB_ENABLE_BOTH) throw(); ### Remarks -See [EnableScrollBar](/windows/win32/api/winuser/nf-winuser-enablescrollbar) in the Windows SDK. +See [`EnableScrollBar`](/windows/win32/api/winuser/nf-winuser-enablescrollbar) in the Windows SDK. -## CWindow::EnableWindow +## `CWindow::EnableWindow` Enables or disables input. @@ -659,13 +658,13 @@ BOOL EnableWindow(BOOL bEnable = TRUE) throw(); ### Remarks -See [EnableWindow](/windows/win32/api/winuser/nf-winuser-enablewindow) in the Windows SDK. +See [`EnableWindow`](/windows/win32/api/winuser/nf-winuser-enablewindow) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#7](../../atl/codesnippet/cpp/cwindow-class_7.cpp)] -## CWindow::EndPaint +## `CWindow::EndPaint` Marks the end of painting. @@ -675,13 +674,13 @@ void EndPaint(LPPAINTSTRUCT lpPaint) throw(); ### Remarks -See [EndPaint](/windows/win32/api/winuser/nf-winuser-endpaint) in the Windows SDK. +See [`EndPaint`](/windows/win32/api/winuser/nf-winuser-endpaint) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#2](../../atl/codesnippet/cpp/cwindow-class_2.cpp)] -## CWindow::FlashWindow +## `CWindow::FlashWindow` Flashes the window once. @@ -691,9 +690,9 @@ BOOL FlashWindow(BOOL bInvert) throw(); ### Remarks -See [FlashWindow](/windows/win32/api/winuser/nf-winuser-flashwindow) in the Windows SDK. +See [`FlashWindow`](/windows/win32/api/winuser/nf-winuser-flashwindow) in the Windows SDK. -## CWindow::GetClientRect +## `CWindow::GetClientRect` Retrieves the coordinates of the client area. @@ -703,13 +702,13 @@ BOOL GetClientRect(LPRECT lpRect) const throw(); ### Remarks -See [GetClientRect](/windows/win32/api/winuser/nf-winuser-getclientrect) in the Windows SDK. +See [`GetClientRect`](/windows/win32/api/winuser/nf-winuser-getclientrect) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#8](../../atl/codesnippet/cpp/cwindow-class_8.cpp)] -## CWindow::GetDC +## `CWindow::GetDC` Retrieves a device context for the client area. @@ -719,13 +718,13 @@ HDC GetDC() throw(); ### Remarks -See [GetDC](/windows/win32/api/winuser/nf-winuser-getdc) in the Windows SDK. +See [`GetDC`](/windows/win32/api/winuser/nf-winuser-getdc) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#9](../../atl/codesnippet/cpp/cwindow-class_9.cpp)] -## CWindow::GetDCEx +## `CWindow::GetDCEx` Retrieves a device context for the client area and allows clipping options. @@ -735,9 +734,9 @@ HDC GetDCEx(HRGN hRgnClip, DWORD flags) throw(); ### Remarks -See [GetDCEx](/windows/win32/api/winuser/nf-winuser-getdcex) in the Windows SDK. +See [`GetDCEx`](/windows/win32/api/winuser/nf-winuser-getdcex) in the Windows SDK. -## CWindow::GetDescendantWindow +## `CWindow::GetDescendantWindow` Finds the descendant window specified by the given identifier. @@ -747,7 +746,7 @@ HWND GetDescendantWindow(int nID) const throw(); ### Parameters -*nID*
+*`nID`*\ [in] The identifier of the descendant window to be retrieved. ### Return Value @@ -758,7 +757,7 @@ The handle to a descendant window. `GetDescendantWindow` searches the entire tree of child windows, not only the windows that are immediate children. -## CWindow::GetDlgControl +## `CWindow::GetDlgControl` Call this function to get a pointer to an interface of an ActiveX control that is hosted by a composite control or a control-hosting dialog. @@ -771,24 +770,24 @@ HRESULT GetDlgControl( ### Parameters -*nID*
+*`nID`*\ [in] The resource ID of the control being retrieved. -*iid*
+*`iid`*\ [in] The ID of the interface you would like to get from the control. -*ppCtrl*
+*`ppCtrl`*\ [out] The pointer to the interface. ### Return Value -Returns S_OK on success or any valid error HRESULT. For example, the function returns E_FAIL if the control specified by *nID* cannot be found and it returns E_NOINTERFACE if the control can be found, but it doesn't support the interface specified by *iid*. +Returns `S_OK` on success or any valid error `HRESULT`. For example, the function returns `E_FAIL` if the control specified by *`nID`* can’t be found and it returns `E_NOINTERFACE` if the control can be found, but it doesn't support the interface specified by *`iid`*. ### Remarks Using this pointer, you can call methods on the interface. -## CWindow::GetDlgCtrlID +## `CWindow::GetDlgCtrlID` Retrieves the window's identifier (for child windows only). @@ -798,9 +797,9 @@ int GetDlgCtrlID() const throw(); ### Remarks -See [GetDlgCtrlID](/windows/win32/api/winuser/nf-winuser-getdlgctrlid) in the Windows SDK. +See [`GetDlgCtrlID`](/windows/win32/api/winuser/nf-winuser-getdlgctrlid) in the Windows SDK. -## CWindow::GetDlgHost +## `CWindow::GetDlgHost` Retrieves a pointer to an interface to the ATL Control hosting container. @@ -813,24 +812,24 @@ HRESULT GetDlgHost( ### Parameters -*nID*
+*`nID`*\ [in] The resource ID of the control being retrieved. -*iid*
+*`iid`*\ [in] The ID of the interface you would like to get from the control. -*ppHost*
+*`ppHost`*\ [out] The pointer to the interface. ### Return Value -Returns S_OK if the window specified by *iid* is a Control Container, and the requested interface could be retrieved. Returns E_FAIL if the window is not a Control Container, or if the interface requested could not be retrieved. If a window with the specified ID could not be found, then the return value is equal to HRESULT_FROM_WIN32(ERROR_CONTROL_ID_NOT_FOUND). +Returns `S_OK` if the window specified by *`iid`* is a Control Container, and the requested interface could be retrieved. Returns `E_FAIL` if the window isn't a Control Container, or if the interface requested couldn't be retrieved. If a window with the specified ID couldn't be found, then the return value is equal to `HRESULT_FROM_WIN32(ERROR_CONTROL_ID_NOT_FOUND)`. ### Remarks Using this pointer, you can call methods on the interface. -## CWindow::GetDlgItem +## `CWindow::GetDlgItem` Retrieves the specified child window. @@ -842,7 +841,7 @@ HWND GetDlgItem(int nID) const throw(); See [GetDlgItem](/windows/win32/api/winuser/nf-winuser-getdlgitem) in the Windows SDK. -## CWindow::GetDlgItemInt +## `CWindow::GetDlgItemInt` Translates a control's text to an integer. @@ -855,9 +854,9 @@ UINT GetDlgItemInt( ### Remarks -See [GetDlgItemInt](/windows/win32/api/winuser/nf-winuser-getdlgitemint) in the Windows SDK. +See [`GetDlgItemInt`](/windows/win32/api/winuser/nf-winuser-getdlgitemint) in the Windows SDK. -## CWindow::GetDlgItemText +## `CWindow::GetDlgItemText` Retrieves a control's text. @@ -876,9 +875,9 @@ BOOL GetDlgItemText( For more information, see [`GetDlgItemText`](/windows/win32/api/winuser/nf-winuser-getdlgitemtextw) in the Windows SDK. -The second version of this method allows you to copy the control's text to a BSTR. This version returns TRUE if the text is successfully copied; otherwise, FALSE. +The second version of this method allows you to copy the control's text to a `BSTR`. This version returns `TRUE` if the text is successfully copied; otherwise, `FALSE`. -## CWindow::GetExStyle +## `CWindow::GetExStyle` Retrieves the extended window styles of the window. @@ -892,15 +891,15 @@ The window's extended styles. ### Remarks -To retrieve the regular window styles, call [GetStyle](#getstyle). +To retrieve the regular window styles, call [`GetStyle`](#getstyle). ### Example [!code-cpp[NVC_ATL_Windowing#10](../../atl/codesnippet/cpp/cwindow-class_10.cpp)] -## CWindow::GetFont +## `CWindow::GetFont` -Retrieves the window's current font by sending a [WM_GETFONT](/windows/win32/winmsg/wm-getfont) message to the window. +Retrieves the window's current font by sending a [`WM_GETFONT`](/windows/win32/winmsg/wm-getfont) message to the window. ``` HFONT GetFont() const throw(); @@ -910,9 +909,9 @@ HFONT GetFont() const throw(); A font handle. -## CWindow::GetHotKey +## `CWindow::GetHotKey` -Determines the hot key associated with the window by sending a WM_GETHOTKEY message. +Determines the hot key associated with the window by sending a `WM_GETHOTKEY` message. ``` DWORD GetHotKey() const throw(); @@ -920,9 +919,9 @@ DWORD GetHotKey() const throw(); ### Return Value -The virtual key code and modifiers for the hot key associated with the window. For a list of possible modifiers, see [WM_GETHOTKEY](/windows/win32/inputdev/wm-gethotkey) in the Windows SDK. For a list of standard virtual key codes, see Winuser.h. +The virtual key code and modifiers for the hot key associated with the window. For a list of possible modifiers, see [`WM_GETHOTKEY`](/windows/win32/inputdev/wm-gethotkey) in the Windows SDK. For a list of standard virtual key codes, see `Winuser.h`. -## CWindow::GetIcon +## `CWindow::GetIcon` Retrieves the handle to the window's large or small icon. @@ -932,8 +931,8 @@ HICON GetIcon(BOOL bBigIcon = TRUE) const; ### Parameters -*bBigIcon*
-[in] If TRUE (the default value) the method returns the large icon. Otherwise, it returns the small icon. +*`bBigIcon`*\ +[in] If `TRUE` (the default value) the method returns the large icon. Otherwise, it returns the small icon. ### Return Value @@ -941,9 +940,9 @@ An icon handle. ### Remarks -`GetIcon` sends a [WM_GETICON](/windows/win32/winmsg/wm-geticon) message to the window. +`GetIcon` sends a [`WM_GETICON`](/windows/win32/winmsg/wm-geticon) message to the window. -## CWindow::GetLastActivePopup +## `CWindow::GetLastActivePopup` Retrieves the most recently active pop-up window. @@ -953,9 +952,9 @@ HWND GetLastActivePopup() const throw(); ### Remarks -See [GetLastActivePopup](/windows/win32/api/winuser/nf-winuser-getlastactivepopup) in the Windows SDK. +See [`GetLastActivePopup`](/windows/win32/api/winuser/nf-winuser-getlastactivepopup) in the Windows SDK. -## CWindow::GetMenu +## `CWindow::GetMenu` Retrieves the window's menu. @@ -965,9 +964,9 @@ HMENU GetMenu() const throw(); ### Remarks -See [GetMenu](/windows/win32/api/winuser/nf-winuser-getmenu) in the Windows SDK. +See [`GetMenu`](/windows/win32/api/winuser/nf-winuser-getmenu) in the Windows SDK. -## CWindow::GetNextDlgGroupItem +## `CWindow::GetNextDlgGroupItem` Retrieves the previous or next control within a group of controls. @@ -977,11 +976,11 @@ HWND GetNextDlgGroupItem(HWND hWndCtl, BOOL bPrevious = FALSE) const throw(); ### Remarks -See [GetNextDlgGroupItem](/windows/win32/api/winuser/nf-winuser-getnextdlggroupitem) in the Windows SDK. +See [`GetNextDlgGroupItem`](/windows/win32/api/winuser/nf-winuser-getnextdlggroupitem) in the Windows SDK. -## CWindow::GetNextDlgTabItem +## `CWindow::GetNextDlgTabItem` -Retrieves the previous or next control having the WS_TABSTOP style. +Retrieves the previous or next control having the `WS_TABSTOP` style. ``` HWND GetNextDlgTabItem(HWND hWndCtl, BOOL bPrevious = FALSE) const throw(); @@ -989,9 +988,9 @@ HWND GetNextDlgTabItem(HWND hWndCtl, BOOL bPrevious = FALSE) const throw(); ### Remarks -See [GetNextDlgTabItem](/windows/win32/api/winuser/nf-winuser-getnextdlgtabitem) in the Windows SDK. +See [`GetNextDlgTabItem`](/windows/win32/api/winuser/nf-winuser-getnextdlgtabitem) in the Windows SDK. -## CWindow::GetParent +## `CWindow::GetParent` Retrieves the immediate parent window. @@ -1001,13 +1000,13 @@ HWND GetParent() const throw(); ### Remarks -See [GetParent](/windows/win32/api/winuser/nf-winuser-getparent) in the Windows SDK. +See [`GetParent`](/windows/win32/api/winuser/nf-winuser-getparent) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#11](../../atl/codesnippet/cpp/cwindow-class_11.cpp)] -## CWindow::GetScrollInfo +## `CWindow::GetScrollInfo` Retrieves the parameters of a scroll bar. @@ -1017,9 +1016,9 @@ BOOL GetScrollInfo(int nBar, LPSCROLLINFO lpScrollInfo) throw(); ### Remarks -See [GetScrollInfo](/windows/win32/api/winuser/nf-winuser-getscrollinfo) in the Windows SDK. +See [`GetScrollInfo`](/windows/win32/api/winuser/nf-winuser-getscrollinfo) in the Windows SDK. -## CWindow::GetScrollPos +## `CWindow::GetScrollPos` Retrieves the position of the scroll box. @@ -1029,9 +1028,9 @@ int GetScrollPos(int nBar) const throw(); ### Remarks -See [GetScrollPos](/windows/win32/api/winuser/nf-winuser-getscrollpos) in the Windows SDK. +See [`GetScrollPos`](/windows/win32/api/winuser/nf-winuser-getscrollpos) in the Windows SDK. -## CWindow::GetScrollRange +## `CWindow::GetScrollRange` Retrieves the scroll bar range. @@ -1044,9 +1043,9 @@ BOOL GetScrollRange( ### Remarks -See [GetScrollRange](/windows/win32/api/winuser/nf-winuser-getscrollrange) in the Windows SDK. +See [`GetScrollRange`](/windows/win32/api/winuser/nf-winuser-getscrollrange) in the Windows SDK. -## CWindow::GetStyle +## `CWindow::GetStyle` Retrieves the window styles of the window. @@ -1060,13 +1059,13 @@ The window's styles. ### Remarks -To retrieve the extended window styles, call [GetExStyle](#getexstyle). +To retrieve the extended window styles, call [`GetExStyle`](#getexstyle). ### Example [!code-cpp[NVC_ATL_Windowing#12](../../atl/codesnippet/cpp/cwindow-class_12.cpp)] -## CWindow::GetSystemMenu +## `CWindow::GetSystemMenu` Creates a copy of the system menu for modification. @@ -1076,9 +1075,9 @@ HMENU GetSystemMenu(BOOL bRevert) const throw(); ### Remarks -See [GetSystemMenu](/windows/win32/api/winuser/nf-winuser-getsystemmenu) in the Windows SDK. +See [`GetSystemMenu`](/windows/win32/api/winuser/nf-winuser-getsystemmenu) in the Windows SDK. -## CWindow::GetTopLevelParent +## `CWindow::GetTopLevelParent` Retrieves the window's top-level parent window. @@ -1090,7 +1089,7 @@ HWND GetTopLevelParent() const throw(); The handle to the top-level parent window. -## CWindow::GetTopLevelWindow +## `CWindow::GetTopLevelWindow` Retrieves the window's top-level parent or owner window. @@ -1102,7 +1101,7 @@ HWND GetTopLevelWindow() const throw(); The handle to the top-level owner window. -## CWindow::GetTopWindow +## `CWindow::GetTopWindow` Retrieves the top-level child window. @@ -1112,13 +1111,13 @@ HWND GetTopWindow() const throw(); ### Remarks -See [GetTopWindow](/windows/win32/api/winuser/nf-winuser-gettopwindow) in the Windows SDK. +See [`GetTopWindow`](/windows/win32/api/winuser/nf-winuser-gettopwindow) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#13](../../atl/codesnippet/cpp/cwindow-class_13.cpp)] -## CWindow::GetUpdateRect +## `CWindow::GetUpdateRect` Retrieves the coordinates of the smallest rectangle that completely encloses the update region. @@ -1128,9 +1127,9 @@ BOOL GetUpdateRect(LPRECT lpRect, BOOL bErase = FALSE) throw(); ### Remarks -See [GetUpdateRect](/windows/win32/api/winuser/nf-winuser-getupdaterect) in the Windows SDK. +See [`GetUpdateRect`](/windows/win32/api/winuser/nf-winuser-getupdaterect) in the Windows SDK. -## CWindow::GetUpdateRgn +## `CWindow::GetUpdateRgn` Retrieves the update region and copies it into a specified region. @@ -1140,9 +1139,9 @@ int GetUpdateRgn(HRGN hRgn, BOOL bErase = FALSE) throw(); ### Remarks -See [GetUpdateRgn](/windows/win32/api/winuser/nf-winuser-getupdatergn) in the Windows SDK. +See [`GetUpdateRgn`](/windows/win32/api/winuser/nf-winuser-getupdatergn) in the Windows SDK. -## CWindow::GetWindow +## `CWindow::GetWindow` Retrieves the specified window. @@ -1154,7 +1153,7 @@ HWND GetWindow(UINT nCmd) const throw(); See `GetWindow` in the Windows SDK. -## CWindow::GetWindowContextHelpId +## `CWindow::GetWindowContextHelpId` Retrieves the window's help context identifier. @@ -1164,9 +1163,9 @@ DWORD GetWindowContextHelpId() const throw(); ### Remarks -See [GetWindowContextHelpId](/windows/win32/api/winuser/nf-winuser-getwindowcontexthelpid) in the Windows SDK. +See [`GetWindowContextHelpId`](/windows/win32/api/winuser/nf-winuser-getwindowcontexthelpid) in the Windows SDK. -## CWindow::GetWindowDC +## `CWindow::GetWindowDC` Retrieves a device context for the entire window. @@ -1176,13 +1175,13 @@ HDC GetWindowDC() throw(); ### Remarks -See [GetWindowDC](/windows/win32/api/winuser/nf-winuser-getwindowdc) in the Windows SDK. +See [`GetWindowDC`](/windows/win32/api/winuser/nf-winuser-getwindowdc) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#14](../../atl/codesnippet/cpp/cwindow-class_14.cpp)] -## CWindow::GetWindowLong +## `CWindow::GetWindowLong` Retrieves a 32-bit value at a specified offset into the extra window memory. @@ -1192,12 +1191,12 @@ LONG GetWindowLong(int nIndex) const throw(); ### Remarks -See [GetWindowLong](/windows/win32/api/winuser/nf-winuser-getwindowlongw) in the Windows SDK. +See [`GetWindowLong`](/windows/win32/api/winuser/nf-winuser-getwindowlongw) in the Windows SDK. > [!NOTE] -> To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [CWindow::GetWindowLongPtr](#getwindowlongptr). +> To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [`CWindow::GetWindowLongPtr`](#getwindowlongptr). -## CWindow::GetWindowLongPtr +## `CWindow::GetWindowLongPtr` Retrieves information about the specified window, including a value at a specified offset into the extra window memory. @@ -1209,14 +1208,14 @@ LONG_PTR GetWindowLongPtr(int nIndex) const throw(); For more information, see [`GetWindowLongPtr`](/windows/win32/api/winuser/nf-winuser-getwindowlongptrw) in the Windows SDK. -If you are retrieving a pointer or a handle, this function supersedes the `CWindow::GetWindowLong` method. +If you're retrieving a pointer or a handle, this function supersedes the `CWindow::GetWindowLong` method. > [!NOTE] > Pointers and handles are 32 bits on 32-bit Windows and 64 bits on 64-bit Windows. To write code that is compatible with both 32-bit and 64-bit versions of Windows, use `CWindow::GetWindowLongPtr`. -## CWindow::GetWindowPlacement +## `CWindow::GetWindowPlacement` Retrieves the show state and positions. @@ -1226,9 +1225,9 @@ BOOL GetWindowPlacement(WINDOWPLACEMENT FAR* lpwndpl) const throw(); ### Remarks -See [GetWindowPlacement](/windows/win32/api/winuser/nf-winuser-getwindowplacement) in the Windows SDK. +See [`GetWindowPlacement`](/windows/win32/api/winuser/nf-winuser-getwindowplacement) in the Windows SDK. -## CWindow::GetWindowProcessID +## `CWindow::GetWindowProcessID` Retrieves the identifier of the process that created the window. @@ -1238,13 +1237,13 @@ DWORD GetWindowProcessID() throw(); ### Remarks -See [GetWindowThreadProcessID](/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid) in the Windows SDK. +See [`GetWindowThreadProcessID`](/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#15](../../atl/codesnippet/cpp/cwindow-class_15.cpp)] -## CWindow::GetWindowRect +## `CWindow::GetWindowRect` Retrieves the window's bounding dimensions. @@ -1254,9 +1253,9 @@ BOOL GetWindowRect(LPRECT lpRect) const throw(); ### Remarks -See [GetWindowRect](/windows/win32/api/winuser/nf-winuser-getwindowrect) in the Windows SDK. +See [`GetWindowRect`](/windows/win32/api/winuser/nf-winuser-getwindowrect) in the Windows SDK. -## CWindow::GetWindowRgn +## `CWindow::GetWindowRgn` Obtains a copy of the window region of a window. @@ -1266,9 +1265,9 @@ int GetWindowRgn(HRGN hRgn) throw(); ### Remarks -See [GetWindowRgn](/windows/win32/api/winuser/nf-winuser-getwindowrgn) in the Windows SDK. +See [`GetWindowRgn`](/windows/win32/api/winuser/nf-winuser-getwindowrgn) in the Windows SDK. -## CWindow::GetWindowText +## `CWindow::GetWindowText` Retrieves the window's text. @@ -1280,29 +1279,29 @@ int GetWindowText(CSimpleString& strText) const; ### Parameters -*lpszStringBuf*
+*`lpszStringBuf`*\ A buffer to which to write the window text. -*nMaxCount*
+*`nMaxCount`*\ The size of the buffer in characters; also the maximum number of characters to write. -*bstrText*
-A BSTR in which to store the window text. +*`bstrText`*\ +A `BSTR` in which to store the window text. -*strText*
+*`strText`*\ A `CString` in which to store the window text. ### Return Value -If the text is successfully copied, the return value is TRUE; otherwise, the return value is FALSE. +If the text is successfully copied, the return value is `TRUE`; otherwise, the return value is `FALSE`. ### Remarks -See [GetWindowText](/windows/win32/api/winuser/nf-winuser-getwindowtextw) in the Windows SDK. +See [`GetWindowText`](/windows/win32/api/winuser/nf-winuser-getwindowtextw) in the Windows SDK. -The second version of this method allows you to store the text in a BSTR; the third version allows you to store the result in a [CString](../../atl-mfc-shared/reference/cstringt-class.md), since `CSimpleString` is the base class of `CString`. +The second version of this method allows you to store the text in a `BSTR`; the third version allows you to store the result in a [`CString`](../../atl-mfc-shared/reference/cstringt-class.md), since `CSimpleString` is the base class of `CString`. -## CWindow::GetWindowTextLength +## `CWindow::GetWindowTextLength` Retrieves the length of the window's text. @@ -1312,9 +1311,9 @@ int GetWindowTextLength() const throw(); ### Remarks -See [GetWindowTextLength](/windows/win32/api/winuser/nf-winuser-getwindowtextlengthw) in the Windows SDK. +See [`GetWindowTextLength`](/windows/win32/api/winuser/nf-winuser-getwindowtextlengthw) in the Windows SDK. -## CWindow::GetWindowThreadID +## `CWindow::GetWindowThreadID` Retrieves the identifier of the thread that created the specified window. @@ -1324,13 +1323,13 @@ DWORD GetWindowThreadID() throw(); ### Remarks -See [GetWindowThreadProcessID](/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid) in the Windows SDK. +See [`GetWindowThreadProcessID`](/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#16](../../atl/codesnippet/cpp/cwindow-class_16.cpp)] -## CWindow::GetWindowWord +## `CWindow::GetWindowWord` Retrieves a 16-bit value at a specified offset into the extra window memory. @@ -1340,9 +1339,9 @@ WORD GetWindowWord(int nIndex) const throw(); ### Remarks -See [GetWindowLong](/windows/win32/api/winuser/nf-winuser-getwindowlongw) in the Windows SDK. +See [`GetWindowLong`](/windows/win32/api/winuser/nf-winuser-getwindowlongw) in the Windows SDK. -## CWindow::GotoDlgCtrl +## `CWindow::GotoDlgCtrl` Sets the keyboard focus to a control in the dialog box. @@ -1352,9 +1351,9 @@ void GotoDlgCtrl(HWND hWndCtrl) const throw(); ### Remarks -See [WM_NEXTDLGCTL](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK. +See [`WM_NEXTDLGCTL`](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK. -## CWindow::HideCaret +## `CWindow::HideCaret` Hides the system caret. @@ -1364,13 +1363,13 @@ BOOL HideCaret() throw(); ### Remarks -See [HideCaret](/windows/win32/api/winuser/nf-winuser-hidecaret) in the Windows SDK. +See [`HideCaret`](/windows/win32/api/winuser/nf-winuser-hidecaret) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#17](../../atl/codesnippet/cpp/cwindow-class_17.cpp)] -## CWindow::HiliteMenuItem +## `CWindow::HiliteMenuItem` Highlights or removes the highlight from a top-level menu item. @@ -1383,9 +1382,9 @@ BOOL HiliteMenuItem( ### Remarks -See [HiliteMenuItem](/windows/win32/api/winuser/nf-winuser-hilitemenuitem) in the Windows SDK. +See [`HiliteMenuItem`](/windows/win32/api/winuser/nf-winuser-hilitemenuitem) in the Windows SDK. -## CWindow::Invalidate +## `CWindow::Invalidate` Invalidates the entire client area. @@ -1395,15 +1394,15 @@ BOOL Invalidate(BOOL bErase = TRUE) throw(); ### Remarks -See [InvalidateRect](/windows/win32/api/winuser/nf-winuser-invalidaterect) in the Windows SDK. +See [`InvalidateRect`](/windows/win32/api/winuser/nf-winuser-invalidaterect) in the Windows SDK. -Passes NULL for the `RECT` parameter to the `InvalidateRect` Win32 function. +Passes `NULL` for the `RECT` parameter to the `InvalidateRect` Win32 function. ### Example [!code-cpp[NVC_ATL_Windowing#18](../../atl/codesnippet/cpp/cwindow-class_18.cpp)] -## CWindow::InvalidateRect +## `CWindow::InvalidateRect` Invalidates the client area within the specified rectangle. @@ -1413,9 +1412,9 @@ BOOL InvalidateRect(LPCRECT lpRect, BOOL bErase = TRUE) throw(); ### Remarks -See [InvalidateRect](/windows/win32/api/winuser/nf-winuser-invalidaterect) in the Windows SDK. +See [`InvalidateRect`](/windows/win32/api/winuser/nf-winuser-invalidaterect) in the Windows SDK. -## CWindow::InvalidateRgn +## `CWindow::InvalidateRgn` Invalidates the client area within the specified region. @@ -1427,9 +1426,9 @@ void InvalidateRgn(HRGN hRgn, BOOL bErase = TRUE) throw(); For more information, see [`InvalidateRgn`](/windows/win32/api/winuser/nf-winuser-invalidatergn) in the Windows SDK. -Specifies a **`void`** return type, while the `InvalidateRgn` Win32 function always returns TRUE. +Specifies a **`void`** return type, while the `InvalidateRgn` Win32 function always returns `TRUE`. -## CWindow::IsChild +## `CWindow::IsChild` Determines whether the specified window is a child window. @@ -1439,9 +1438,9 @@ BOOL IsChild(const HWND hWnd) const throw(); ### Remarks -See [IsChild](/windows/win32/api/winuser/nf-winuser-ischild) in the Windows SDK. +See [`IsChild`](/windows/win32/api/winuser/nf-winuser-ischild) in the Windows SDK. -## CWindow::IsDialogMessage +## `CWindow::IsDialogMessage` Determines whether a message is intended for the specified dialog box. @@ -1451,9 +1450,9 @@ BOOL IsDialogMessage(LPMSG lpMsg) throw(); ### Remarks -See [IsDialogMessage](/windows/win32/api/winuser/nf-winuser-isdialogmessagew) in the Windows SDK. +See [`IsDialogMessage`](/windows/win32/api/winuser/nf-winuser-isdialogmessagew) in the Windows SDK. -## CWindow::IsDlgButtonChecked +## `CWindow::IsDlgButtonChecked` Determines the check state of the button. @@ -1463,9 +1462,9 @@ UINT IsDlgButtonChecked(int nIDButton) const throw(); ### Remarks -See [IsDlgButtonChecked](/windows/win32/api/winuser/nf-winuser-isdlgbuttonchecked) in the Windows SDK. +See [`IsDlgButtonChecked`](/windows/win32/api/winuser/nf-winuser-isdlgbuttonchecked) in the Windows SDK. -## CWindow::IsIconic +## `CWindow::IsIconic` Determines whether the window is minimized. @@ -1475,13 +1474,13 @@ BOOL IsIconic() const throw(); ### Remarks -See [IsIconic](/windows/win32/api/winuser/nf-winuser-isiconic) in the Windows SDK. +See [`IsIconic`](/windows/win32/api/winuser/nf-winuser-isiconic) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#19](../../atl/codesnippet/cpp/cwindow-class_19.cpp)] -## CWindow::IsParentDialog +## `CWindow::IsParentDialog` Determines if the parent window of the control is a dialog window. @@ -1491,9 +1490,9 @@ BOOL IsParentDialog() throw(); ### Return Value -Returns TRUE if the parent window is a dialog, FALSE otherwise. +Returns `TRUE` if the parent window is a dialog, `FALSE` otherwise. -## CWindow::IsWindow +## `CWindow::IsWindow` Determines whether the specified window handle identifies an existing window. @@ -1503,13 +1502,13 @@ BOOL IsWindow() throw(); ### Remarks -See [IsWindow](/windows/win32/api/winuser/nf-winuser-iswindow) in the Windows SDK. +See [`IsWindow`](/windows/win32/api/winuser/nf-winuser-iswindow) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#20](../../atl/codesnippet/cpp/cwindow-class_20.cpp)] -## CWindow::IsWindowEnabled +## `CWindow::IsWindowEnabled` Determines whether the window is enabled for input. @@ -1519,13 +1518,13 @@ BOOL IsWindowEnabled() const throw(); ### Remarks -See [IsWindowEnabled](/windows/win32/api/winuser/nf-winuser-iswindowenabled) in the Windows SDK. +See [`IsWindowEnabled`](/windows/win32/api/winuser/nf-winuser-iswindowenabled) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#21](../../atl/codesnippet/cpp/cwindow-class_21.cpp)] -## CWindow::IsWindowVisible +## `CWindow::IsWindowVisible` Determines the window's visibility state. @@ -1535,13 +1534,13 @@ BOOL IsWindowVisible() const throw(); ### Remarks -See [IsWindowVisible](/windows/win32/api/winuser/nf-winuser-iswindowvisible) in the Windows SDK. +See [`IsWindowVisible`](/windows/win32/api/winuser/nf-winuser-iswindowvisible) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#22](../../atl/codesnippet/cpp/cwindow-class_22.cpp)] -## CWindow::IsWindowUnicode +## `CWindow::IsWindowUnicode` Determines whether the specified window is a native Unicode window. @@ -1551,13 +1550,13 @@ BOOL IsWindowUnicode() throw(); ### Remarks -See [IsWindowUnicode](/windows/win32/api/winuser/nf-winuser-iswindowunicode) in the Windows SDK. +See [`IsWindowUnicode`](/windows/win32/api/winuser/nf-winuser-iswindowunicode) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#23](../../atl/codesnippet/cpp/cwindow-class_23.cpp)] -## CWindow::IsZoomed +## `CWindow::IsZoomed` Determines whether the window is maximized. @@ -1567,9 +1566,9 @@ BOOL IsZoomed() const throw(); ### Remarks -See [IsZoomed](/windows/win32/api/winuser/nf-winuser-iszoomed) in the Windows SDK. +See [`IsZoomed`](/windows/win32/api/winuser/nf-winuser-iszoomed) in the Windows SDK. -## CWindow::KillTimer +## `CWindow::KillTimer` Destroys a timer event created by `CWindow::SetTimer`. @@ -1579,11 +1578,11 @@ BOOL KillTimer(UINT nIDEvent) throw(); ### Remarks -See [KillTimer](/windows/win32/api/winuser/nf-winuser-killtimer) in the Windows SDK. +See [`KillTimer`](/windows/win32/api/winuser/nf-winuser-killtimer) in the Windows SDK. -## CWindow::LockWindowUpdate +## `CWindow::LockWindowUpdate` -Disables or enables drawing in the window by calling the [LockWindowUpdate](/windows/win32/api/winuser/nf-winuser-lockwindowupdate) Win32 function. +Disables or enables drawing in the window by calling the [`LockWindowUpdate`](/windows/win32/api/winuser/nf-winuser-lockwindowupdate) Win32 function. ``` BOOL LockWindowUpdate(BOOL bLock = TRUE) throw(); @@ -1591,18 +1590,18 @@ BOOL LockWindowUpdate(BOOL bLock = TRUE) throw(); ### Parameters -*bLock*
-[in] If TRUE (the default value), the window will be locked. Otherwise, it will be unlocked. +*`bLock`*\ +[in] If `TRUE` (the default value), the window will be locked. Otherwise, it will be unlocked. ### Return Value -TRUE if the window is successfully locked; otherwise, FALSE. +`TRUE` if the window is successfully locked; otherwise, `FALSE`. ### Remarks -If *bLock* is TRUE, this method passes [m_hWnd](#m_hwnd) to the Win32 function; otherwise, it passes NULL. +If *`bLock`* is `TRUE`, this method passes [`m_hWnd`](#m_hwnd) to the Win32 function; otherwise, it passes `NULL`. -## CWindow::m_hWnd +## `CWindow::m_hWnd` Contains a handle to the window associated with the `CWindow` object. @@ -1610,7 +1609,7 @@ Contains a handle to the window associated with the `CWindow` object. HWND m_hWnd throw() throw(); ``` -## CWindow::MapWindowPoints +## `CWindow::MapWindowPoints` Converts a set of points from the window's coordinate space to the coordinate space of another window. @@ -1627,11 +1626,11 @@ int MapWindowPoints( ### Remarks -See [MapWindowPoints](/windows/win32/api/winuser/nf-winuser-mapwindowpoints) in the Windows SDK. +See [`MapWindowPoints`](/windows/win32/api/winuser/nf-winuser-mapwindowpoints) in the Windows SDK. -The second version of this method allows you to convert the coordinates of a [RECT](/windows/win32/api/windef/ns-windef-rect) structure. +The second version of this method allows you to convert the coordinates of a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure. -## CWindow::MessageBox +## `CWindow::MessageBox` Displays a message box. @@ -1644,13 +1643,13 @@ int MessageBox( ### Remarks -See [MessageBox](/windows/win32/api/winuser/nf-winuser-messagebox) in the Windows SDK. +See [`MessageBox`](/windows/win32/api/winuser/nf-winuser-messagebox) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#24](../../atl/codesnippet/cpp/cwindow-class_24.cpp)] -## CWindow::ModifyStyle +## `CWindow::ModifyStyle` Modifies the window styles of the `CWindow` object. @@ -1663,40 +1662,40 @@ BOOL ModifyStyle( ### Parameters -*dwRemove*
+*`dwRemove`*\ [in] Specifies the window styles to be removed during style modification. -*dwAdd*
+*`dwAdd`*\ [in] Specifies the window styles to be added during style modification. -*nFlags*
-[in] Window-positioning flags. For a list of possible values, see the [SetWindowPos](/windows/win32/api/winuser/nf-winuser-setwindowpos) function in the Windows SDK. +*`nFlags`*\ +[in] Window-positioning flags. For a list of possible values, see the [`SetWindowPos`](/windows/win32/api/winuser/nf-winuser-setwindowpos) function in the Windows SDK. ### Return Value -TRUE if the window styles are modified; otherwise, FALSE. +`TRUE` if the window styles are modified; otherwise, `FALSE`. ### Remarks -Styles to be added or removed can be combined by using the bitwise OR ( | ) operator. See the [CreateWindow](/windows/win32/api/winuser/nf-winuser-createwindoww) function in the Windows SDKfor information about the available window styles. +Styles to be added or removed can be combined by using the bitwise "or" (`|`) operator. See the [`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww) function in the Windows SDKfor information about the available window styles. -If *nFlags* is nonzero, `ModifyStyle` calls the Win32 function `SetWindowPos`, and redraws the window by combining *nFlags* with the following four flags: +If *`nFlags`* is nonzero, `ModifyStyle` calls the Win32 function `SetWindowPos`, and redraws the window by combining *`nFlags`* with the following four flags: -- SWP_NOSIZE Retains the current size. +- `SWP_NOSIZE` Retains the current size. -- SWP_NOMOVE Retains the current position. +- `SWP_NOMOVE` Retains the current position. -- SWP_NOZORDER Retains the current Z order. +- `SWP_NOZORDER` Retains the current Z order. -- SWP_NOACTIVATE Does not activate the window. +- `SWP_NOACTIVATE` Doesn't activate the window. -To modify a window's extended styles, call [ModifyStyleEx](#modifystyleex). +To modify a window's extended styles, call [`ModifyStyleEx`](#modifystyleex). ### Example [!code-cpp[NVC_ATL_Windowing#25](../../atl/codesnippet/cpp/cwindow-class_25.cpp)] -## CWindow::ModifyStyleEx +## `CWindow::ModifyStyleEx` Modifies the extended window styles of the `CWindow` object. @@ -1709,40 +1708,40 @@ BOOL ModifyStyleEx( ### Parameters -*dwRemove*
+*`dwRemove`*\ [in] Specifies the extended styles to be removed during style modification. -*dwAdd*
+*`dwAdd`*\ [in] Specifies the extended styles to be added during style modification. -*nFlags*
-[in] Window-positioning flags. For a list of possible values, see the [SetWindowPos](/windows/win32/api/winuser/nf-winuser-setwindowpos) function in the Windows SDK. +*`nFlags`*\ +[in] Window-positioning flags. For a list of possible values, see the [`SetWindowPos`](/windows/win32/api/winuser/nf-winuser-setwindowpos) function in the Windows SDK. ### Return Value -TRUE if the extended window styles are modified; otherwise, FALSE. +`TRUE` if the extended window styles are modified; otherwise, `FALSE`. ### Remarks -Styles to be added or removed can be combined by using the bitwise OR ( | ) operator. See the [CreateWindowEx](/windows/win32/api/winuser/nf-winuser-createwindowexw) function in the Windows SDKfor information about the available extended styles. +Styles to be added or removed can be combined by using the bitwise "or" (`|`) operator. See the [`CreateWindowEx`](/windows/win32/api/winuser/nf-winuser-createwindowexw) function in the Windows SDK for information about the available extended styles. -If *nFlags* is nonzero, `ModifyStyleEx` calls the Win32 function `SetWindowPos`, and redraws the window by combining *nFlags* with the following four flags: +If *`nFlags`* is nonzero, `ModifyStyleEx` calls the Win32 function `SetWindowPos`, and redraws the window by combining *`nFlags`* with the following four flags: -- SWP_NOSIZE Retains the current size. +- `SWP_NOSIZE` Retains the current size. -- SWP_NOMOVE Retains the current position. +- `SWP_NOMOVE` Retains the current position. -- SWP_NOZORDER Retains the current Z order. +- `SWP_NOZORDER` Retains the current Z order. -- SWP_NOACTIVATE Does not activate the window. +- `SWP_NOACTIVATE` Doesn't activate the window. -To modify windows using regular window styles, call [ModifyStyle](#modifystyle). +To modify windows using regular window styles, call [`ModifyStyle`](#modifystyle). ### Example [!code-cpp[NVC_ATL_Windowing#26](../../atl/codesnippet/cpp/cwindow-class_26.cpp)] -## CWindow::MoveWindow +## `CWindow::MoveWindow` Changes the window's size and position. @@ -1761,11 +1760,11 @@ BOOL MoveWindow( ### Remarks -For a top-level window object, the x and y parameters are relative to the upper-left corner of the screen. For a child window object, they are relative to the upper-left corner of the parent window's client area. +For a top-level window object, the `x` and `y` parameters are relative to the upper-left corner of the screen. For a child window object, they're relative to the upper-left corner of the parent window's client area. -The second version of this method uses a [RECT](/windows/win32/api/windef/ns-windef-rect) structure to determine the window's new position, width, and height. +The second version of this method uses a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure to determine the window's new position, width, and height. -## CWindow::NextDlgCtrl +## `CWindow::NextDlgCtrl` Sets the keyboard focus to the next control in the dialog box. @@ -1775,9 +1774,9 @@ void NextDlgCtrl() const throw(); ### Remarks -See [WM_NEXTDLGCTL](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK. +See [`WM_NEXTDLGCTL`](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK. -## CWindow::OpenClipboard +## `CWindow::OpenClipboard` Opens the Clipboard. @@ -1787,25 +1786,25 @@ BOOL OpenClipboard() throw(); ### Remarks -See [OpenClipboard](/windows/win32/api/winuser/nf-winuser-openclipboard) in the Windows SDK. +See [`OpenClipboard`](/windows/win32/api/winuser/nf-winuser-openclipboard) in the Windows SDK. -## CWindow::operator HWND +## `CWindow::operator HWND` -Converts a `CWindow` object to an HWND. +Converts a `CWindow` object to an `HWND`. ``` operator HWND() const throw(); ``` -## CWindow::operator = +## `CWindow::operator =` -Assigns an HWND to the `CWindow` object by setting the [m_hWnd](#m_hwnd) member to `hWnd`. +Assigns an `HWND` to the `CWindow` object by setting the [`m_hWnd`](#m_hwnd) member to `hWnd`. ``` CWindow& operator= (HWND hWnd) throw(); ``` -## CWindow::PostMessage +## `CWindow::PostMessage` Places a message in the message queue associated with the thread that created the window. @@ -1818,7 +1817,7 @@ BOOL PostMessage( ### Remarks -See [PostMessage](/windows/win32/api/winuser/nf-winuser-postmessagew) in the Windows SDK. +See [`PostMessage`](/windows/win32/api/winuser/nf-winuser-postmessagew) in the Windows SDK. Returns without waiting for the thread to process the message. @@ -1826,7 +1825,7 @@ Returns without waiting for the thread to process the message. [!code-cpp[NVC_ATL_Windowing#27](../../atl/codesnippet/cpp/cwindow-class_27.cpp)] -## CWindow::PrevDlgCtrl +## `CWindow::PrevDlgCtrl` Sets the keyboard focus to the previous control in the dialog box. @@ -1836,11 +1835,11 @@ void PrevDlgCtrl() const throw(); ### Remarks -See [WM_NEXTDLGCTL](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK. +See [`WM_NEXTDLGCTL`](/windows/win32/dlgbox/wm-nextdlgctl) in the Windows SDK. -## CWindow::Print +## `CWindow::Print` -Sends a [WM_PRINT](/windows/win32/gdi/wm-print) message to the window to request that it draw itself in the specified device context. +Sends a [`WM_PRINT`](/windows/win32/gdi/wm-print) message to the window to request that it draw itself in the specified device context. ```cpp void Print(HDC hDC, DWORD dwFlags) const throw(); @@ -1848,27 +1847,27 @@ void Print(HDC hDC, DWORD dwFlags) const throw(); ### Parameters -*hDC*
+*`hDC`*\ [in] The handle to a device context. -*dwFlags*
+*`dwFlags`*\ [in] Specifies the drawing options. You can combine one or more of the following flags: -- PRF_CHECKVISIBLE Draw the window only if it is visible. +- `PRF_CHECKVISIBLE` Draw the window only if it's visible. -- PRF_CHILDREN Draw all visible child windows. +- `PRF_CHILDREN` Draw all visible child windows. -- PRF_CLIENT Draw the client area of the window. +- `PRF_CLIENT` Draw the client area of the window. -- PRF_ERASEBKGND Erase the background before drawing the window. +- `PRF_ERASEBKGND` Erase the background before drawing the window. -- PRF_NONCLIENT Draw the non-client area of the window. +- `PRF_NONCLIENT` Draw the non-client area of the window. -- PRF_OWNED Draw all owned windows. +- `PRF_OWNED` Draw all owned windows. -## CWindow::PrintClient +## `CWindow::PrintClient` -Sends a [WM_PRINTCLIENT](/windows/win32/gdi/wm-printclient) message to the window to request that it draw its client area in the specified device context. +Sends a [`WM_PRINTCLIENT`](/windows/win32/gdi/wm-printclient) message to the window to request that it draw its client area in the specified device context. ```cpp void PrintClient(HDC hDC, DWORD dwFlags) const throw(); @@ -1876,25 +1875,25 @@ void PrintClient(HDC hDC, DWORD dwFlags) const throw(); ### Parameters -*hDC*
+*`hDC`*\ [in] The handle to a device context. -*dwFlags*
+*`dwFlags`*\ [in] Specifies drawing options. You can combine one or more of the following flags: -- PRF_CHECKVISIBLE Draw the window only if it is visible. +- `PRF_CHECKVISIBLE` Draw the window only if it's visible. -- PRF_CHILDREN Draw all visible child windows. +- `PRF_CHILDREN` Draw all visible child windows. -- PRF_CLIENT Draw the client area of the window. +- `PRF_CLIENT` Draw the client area of the window. -- PRF_ERASEBKGND Erase the background before drawing the window. +- `PRF_ERASEBKGND` Erase the background before drawing the window. -- PRF_NONCLIENT Draw the non-client area of the window. +- `PRF_NONCLIENT` Draw the non-client area of the window. -- PRF_OWNED Draw all owned windows. +- `PRF_OWNED` Draw all owned windows. -## CWindow::rcDefault +## `CWindow::rcDefault` Contains default window dimensions. @@ -1902,7 +1901,7 @@ Contains default window dimensions. static RECT rcDefault; ``` -## CWindow::RedrawWindow +## `CWindow::RedrawWindow` Updates a specified rectangle or region in the client area. @@ -1917,13 +1916,13 @@ throw() ### Remarks -See [RedrawWindow](/windows/win32/api/winuser/nf-winuser-redrawwindow) in the Windows SDK. +See [`RedrawWindow`](/windows/win32/api/winuser/nf-winuser-redrawwindow) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#28](../../atl/codesnippet/cpp/cwindow-class_28.cpp)] -## CWindow::ReleaseDC +## `CWindow::ReleaseDC` Releases a device context. @@ -1933,13 +1932,13 @@ int ReleaseDC(HDC hDC); ### Remarks -See [ReleaseDC](/windows/win32/api/winuser/nf-winuser-releasedc) in the Windows SDK. +See [`ReleaseDC`](/windows/win32/api/winuser/nf-winuser-releasedc) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#9](../../atl/codesnippet/cpp/cwindow-class_9.cpp)] -## CWindow::ResizeClient +## `CWindow::ResizeClient` Resizes the window to the specified client area size. @@ -1952,16 +1951,16 @@ BOOL ResizeClient( ### Parameters -*nWidth*
+*`nWidth`*\ New width of the window in pixels. -*nHeight*
+*`nHeight`*\ New height of the window in pixels. -*bRedraw*
-A flag indicating whether to redraw changes. Default is FALSE, indicating the window does not redraw changes. +*`bRedraw`*\ +A flag indicating whether to redraw changes. Default is `FALSE`, indicating the window doesn't redraw changes. -## CWindow::ScreenToClient +## `CWindow::ScreenToClient` Converts screen coordinates to client coordinates. @@ -1972,11 +1971,11 @@ BOOL ScreenToClient(LPRECT lpRect) const throw(); ### Remarks -See [ScreenToClient](/windows/win32/api/winuser/nf-winuser-screentoclient) in the Windows SDK. +See [`ScreenToClient`](/windows/win32/api/winuser/nf-winuser-screentoclient) in the Windows SDK. -The second version of this method allows you to convert the coordinates of a [RECT](/windows/win32/api/windef/ns-windef-rect) structure. +The second version of this method allows you to convert the coordinates of a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure. -## CWindow::ScrollWindow +## `CWindow::ScrollWindow` Scrolls the specified client area. @@ -1990,9 +1989,9 @@ BOOL ScrollWindow( ### Remarks -See [ScrollWindow](/windows/win32/api/winuser/nf-winuser-scrollwindow) in the Windows SDK. +See [`ScrollWindow`](/windows/win32/api/winuser/nf-winuser-scrollwindow) in the Windows SDK. -## CWindow::ScrollWindowEx +## `CWindow::ScrollWindowEx` Scrolls the specified client area with additional features. @@ -2009,9 +2008,9 @@ int ScrollWindowEx( ### Remarks -See [ScrollWindowEx](/windows/win32/api/winuser/nf-winuser-scrollwindowex) in the Windows SDK. +See [`ScrollWindowEx`](/windows/win32/api/winuser/nf-winuser-scrollwindowex) in the Windows SDK. -## CWindow::SendDlgItemMessage +## `CWindow::SendDlgItemMessage` Sends a message to a control. @@ -2025,11 +2024,11 @@ LRESULT SendDlgItemMessage( ### Remarks -See [SendDlgItemMessage](/windows/win32/api/winuser/nf-winuser-senddlgitemmessagew) in the Windows SDK. +See [`SendDlgItemMessage`](/windows/win32/api/winuser/nf-winuser-senddlgitemmessagew) in the Windows SDK. -## CWindow::SendMessage +## `CWindow::SendMessage` -Sends a message to the window and does not return until the window procedure has processed the message. +Sends a message to the window and doesn't return until the window procedure has processed the message. ``` LRESULT SendMessage( @@ -2046,13 +2045,13 @@ static LRESULT SendMessage( ### Remarks -See [SendMessage](/windows/win32/api/winuser/nf-winuser-sendmessage) in the Windows SDK. +See [`SendMessage`](/windows/win32/api/winuser/nf-winuser-sendmessage) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#29](../../atl/codesnippet/cpp/cwindow-class_29.cpp)] -## CWindow::SendMessageToDescendants +## `CWindow::SendMessageToDescendants` Sends the specified message to all immediate children of the `CWindow` object. @@ -2066,23 +2065,23 @@ void SendMessageToDescendants( ### Parameters -*message*
+*`message`*\ [in] The message to be sent. -*wParam*
+*`wParam`*\ [in] Additional message-specific information. -*lParam*
+*`lParam`*\ [in] Additional message-specific information. -*bDeep*
-[in] If TRUE (the default value), the message will be sent to all descendant windows; otherwise, it will be sent only to the immediate child windows. +*`bDeep`*\ +[in] If `TRUE` (the default value), the message will be sent to all descendant windows; otherwise, it will be sent only to the immediate child windows. ### Remarks -If *bDeep* is TRUE, the message is additionally sent to all other descendant windows. +If *`bDeep`* is `TRUE`, the message is additionally sent to all other descendant windows. -## CWindow::SendNotifyMessage +## `CWindow::SendNotifyMessage` Sends a message to the window. @@ -2095,11 +2094,11 @@ BOOL SendNotifyMessage( ### Remarks -See [SendNotifyMessage](/windows/win32/api/winuser/nf-winuser-sendnotifymessagew) in the Windows SDK. +See [`SendNotifyMessage`](/windows/win32/api/winuser/nf-winuser-sendnotifymessagew) in the Windows SDK. -If the window was created by the calling thread, `SendNotifyMessage` does not return until the window procedure has processed the message. Otherwise, it returns immediately. +If the window was created by the calling thread, `SendNotifyMessage` doesn't return until the window procedure has processed the message. Otherwise, it returns immediately. -## CWindow::SetActiveWindow +## `CWindow::SetActiveWindow` Activates the window. @@ -2109,13 +2108,13 @@ HWND SetActiveWindow() throw(); ### Remarks -See [SetActiveWindow](/windows/win32/api/winuser/nf-winuser-setactivewindow) in the Windows SDK. +See [`SetActiveWindow`](/windows/win32/api/winuser/nf-winuser-setactivewindow) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#30](../../atl/codesnippet/cpp/cwindow-class_30.cpp)] -## CWindow::SetCapture +## `CWindow::SetCapture` Sends all subsequent mouse input to the window. @@ -2125,9 +2124,9 @@ HWND SetCapture() throw(); ### Remarks -See [SetCapture](/windows/win32/api/winuser/nf-winuser-setcapture) in the Windows SDK. +See [`SetCapture`](/windows/win32/api/winuser/nf-winuser-setcapture) in the Windows SDK. -## CWindow::SetClipboardViewer +## `CWindow::SetClipboardViewer` Adds the window to the Clipboard viewer chain. @@ -2137,9 +2136,9 @@ HWND SetClipboardViewer() throw(); ### Remarks -See [SetClipboardViewer](/windows/win32/api/winuser/nf-winuser-setclipboardviewer) in the Windows SDK. +See [`SetClipboardViewer`](/windows/win32/api/winuser/nf-winuser-setclipboardviewer) in the Windows SDK. -## CWindow::SetDlgCtrlID +## `CWindow::SetDlgCtrlID` Sets the identifier of the window to the specified value. @@ -2149,14 +2148,14 @@ int SetDlgCtrlID(int nID) throw(); ### Parameters -*nID*
+*`nID`*\ [in] The new value to set for the window's identifier. ### Return Value If successful, the previous identifier of the window; otherwise 0. -## CWindow::SetDlgItemInt +## `CWindow::SetDlgItemInt` Changes a control's text to the string representation of an integer value. @@ -2169,9 +2168,9 @@ BOOL SetDlgItemInt( ### Remarks -See [SetDlgItemInt](/windows/win32/api/winuser/nf-winuser-setdlgitemint) in the Windows SDK. +See [`SetDlgItemInt`](/windows/win32/api/winuser/nf-winuser-setdlgitemint) in the Windows SDK. -## CWindow::SetDlgItemText +## `CWindow::SetDlgItemText` Changes a control's text. @@ -2181,9 +2180,9 @@ BOOL SetDlgItemText(int nID, LPCTSTR lpszString) throw(); ### Remarks -See [SetDlgItemText](/windows/win32/api/winuser/nf-winuser-setdlgitemtextw) in the Windows SDK. +See [`SetDlgItemText`](/windows/win32/api/winuser/nf-winuser-setdlgitemtextw) in the Windows SDK. -## CWindow::SetFocus +## `CWindow::SetFocus` Sets the input focus to the window. @@ -2193,15 +2192,15 @@ HWND SetFocus() throw(); ### Remarks -See [SetFocus](/windows/win32/api/winuser/nf-winuser-setfocus) in the Windows SDK. +See [`SetFocus`](/windows/win32/api/winuser/nf-winuser-setfocus) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#31](../../atl/codesnippet/cpp/cwindow-class_31.cpp)] -## CWindow::SetFont +## `CWindow::SetFont` -Changes the window's current font by sending a [WM_SETFONT](/windows/win32/winmsg/wm-setfont) message to the window. +Changes the window's current font by sending a [`WM_SETFONT`](/windows/win32/winmsg/wm-setfont) message to the window. ```cpp void SetFont(HFONT hFont, BOOL bRedraw = TRUE) throw(); @@ -2209,15 +2208,15 @@ void SetFont(HFONT hFont, BOOL bRedraw = TRUE) throw(); ### Parameters -*hFont*
+*`hFont`*\ [in] The handle to the new font. -*bRedraw*
-[in] If TRUE (the default value), the window is redrawn. Otherwise, it is not. +*`bRedraw`*\ +[in] If `TRUE` (the default value), the window is redrawn. Otherwise, it isn't. -## CWindow::SetHotKey +## `CWindow::SetHotKey` -Associates a hot key with the window by sending a WM_SETHOTKEY message. +Associates a hot key with the window by sending a `WM_SETHOTKEY` message. ``` int SetHotKey(WORD wVirtualKeyCode, WORD wModifiers) throw(); @@ -2225,19 +2224,19 @@ int SetHotKey(WORD wVirtualKeyCode, WORD wModifiers) throw(); ### Parameters -*wVirtualKeyCode*
-[in] The virtual key code of the hot key. For a list of standard virtual key codes, see Winuser.h. +*`wVirtualKeyCode`*\ +[in] The virtual key code of the hot key. For a list of standard virtual key codes, see `Winuser.h`. -*wModifiers*
-[in] The modifiers of the hot key. For a list of possible values, see WM_SETHOTKEY in the Windows SDK. +*`wModifiers`*\ +[in] The modifiers of the hot key. For a list of possible values, see `WM_SETHOTKEY` in the Windows SDK. ### Return Value -For a list of possible return values, see [WM_SETHOTKEY](/windows/win32/inputdev/wm-sethotkey) in the Windows SDK. +For a list of possible return values, see [`WM_SETHOTKEY`](/windows/win32/inputdev/wm-sethotkey) in the Windows SDK. -## CWindow::SetIcon +## `CWindow::SetIcon` -Sets the window's large or small icon to the icon identified by *hIcon*. +Sets the window's large or small icon to the icon identified by *`hIcon`*. ``` HICON SetIcon(HICON hIcon, BOOL bBigIcon = TRUE) throw(); @@ -2245,11 +2244,11 @@ HICON SetIcon(HICON hIcon, BOOL bBigIcon = TRUE) throw(); ### Parameters -*hIcon*
+*`hIcon`*\ [in] The handle to a new icon. -*bBigIcon*
-[in] If TRUE (the default value), the method sets a large icon. Otherwise, it sets a small icon. +*`bBigIcon`*\ +[in] If `TRUE` (the default value), the method sets a large icon. Otherwise, it sets a small icon. ### Return Value @@ -2257,9 +2256,9 @@ The handle to the previous icon. ### Remarks -`SetIcon` sends a [WM_SETICON](/windows/win32/winmsg/wm-seticon) message to the window. +`SetIcon` sends a [`WM_SETICON`](/windows/win32/winmsg/wm-seticon) message to the window. -## CWindow::SetMenu +## `CWindow::SetMenu` Changes the window's current menu. @@ -2269,9 +2268,9 @@ BOOL SetMenu(HMENU hMenu) throw(); ### Remarks -See [SetMenu](/windows/win32/api/winuser/nf-winuser-setmenu) in the Windows SDK. +See [`SetMenu`](/windows/win32/api/winuser/nf-winuser-setmenu) in the Windows SDK. -## CWindow::SetParent +## `CWindow::SetParent` Changes the parent window. @@ -2281,15 +2280,15 @@ HWND SetParent(HWND hWndNewParent) throw(); ### Remarks -See [SetParent](/windows/win32/api/winuser/nf-winuser-setparent) in the Windows SDK. +See [`SetParent`](/windows/win32/api/winuser/nf-winuser-setparent) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#32](../../atl/codesnippet/cpp/cwindow-class_32.cpp)] -## CWindow::SetRedraw +## `CWindow::SetRedraw` -Sets or clears the redraw flag by sending a [WM_SETREDRAW](/windows/win32/gdi/wm-setredraw) message to the window. +Sets or clears the redraw flag by sending a [`WM_SETREDRAW`](/windows/win32/gdi/wm-setredraw) message to the window. ```cpp void SetRedraw(BOOL bRedraw = TRUE) throw(); @@ -2297,8 +2296,8 @@ void SetRedraw(BOOL bRedraw = TRUE) throw(); ### Parameters -*bRedraw*
-[in] Specifies the state of the redraw flag. If TRUE (the default value), the redraw flag is set; if FALSE, the flag is cleared. +*`bRedraw`*\ +[in] Specifies the state of the redraw flag. If `TRUE` (the default value), the redraw flag is set; if `FALSE`, the flag is cleared. ### Remarks @@ -2308,7 +2307,7 @@ Call `SetRedraw` to allow changes to be redrawn or to prevent changes from being [!code-cpp[NVC_ATL_Windowing#33](../../atl/codesnippet/cpp/cwindow-class_33.cpp)] -## CWindow::SetScrollInfo +## `CWindow::SetScrollInfo` Sets the parameters of a scroll bar. @@ -2321,9 +2320,9 @@ int SetScrollInfo( ### Remarks -See [SetScrollInfo](/windows/win32/api/winuser/nf-winuser-setscrollinfo) in the Windows SDK. +See [`SetScrollInfo`](/windows/win32/api/winuser/nf-winuser-setscrollinfo) in the Windows SDK. -## CWindow::SetScrollPos +## `CWindow::SetScrollPos` Changes the position of the scroll box. @@ -2336,9 +2335,9 @@ int SetScrollPos( ### Remarks -See [SetScrollPos](/windows/win32/api/winuser/nf-winuser-setscrollpos) in the Windows SDK. +See [`SetScrollPos`](/windows/win32/api/winuser/nf-winuser-setscrollpos) in the Windows SDK. -## CWindow::SetScrollRange +## `CWindow::SetScrollRange` Changes the scroll bar range. @@ -2352,9 +2351,9 @@ BOOL SetScrollRange( ### Remarks -See [SetScrollRange](/windows/win32/api/winuser/nf-winuser-setscrollrange) in the Windows SDK. +See [`SetScrollRange`](/windows/win32/api/winuser/nf-winuser-setscrollrange) in the Windows SDK. -## CWindow::SetTimer +## `CWindow::SetTimer` Creates a timer event. @@ -2367,9 +2366,9 @@ UINT SetTimer( ### Remarks -See [SetTimer](/windows/win32/api/winuser/nf-winuser-settimer) in the Windows SDK. +See [`SetTimer`](/windows/win32/api/winuser/nf-winuser-settimer) in the Windows SDK. -## CWindow::SetWindowContextHelpId +## `CWindow::SetWindowContextHelpId` Sets the window's help context identifier. @@ -2379,9 +2378,9 @@ BOOL SetWindowContextHelpId(DWORD dwContextHelpId) throw(); ### Remarks -See [SetWindowContextHelpId](/windows/win32/api/winuser/nf-winuser-setwindowcontexthelpid) in the Windows SDK. +See [`SetWindowContextHelpId`](/windows/win32/api/winuser/nf-winuser-setwindowcontexthelpid) in the Windows SDK. -## CWindow::SetWindowLong +## `CWindow::SetWindowLong` Sets a 32-bit value at a specified offset into the extra window memory. @@ -2391,12 +2390,12 @@ LONG SetWindowLong(int nIndex, LONG dwNewLong) throw(); ### Remarks -See [SetWindowLong](/windows/win32/api/winuser/nf-winuser-setwindowlongw) in the Windows SDK. +See [`SetWindowLong`](/windows/win32/api/winuser/nf-winuser-setwindowlongw) in the Windows SDK. > [!NOTE] -> To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [CWindow::SetWindowLongPtr](#setwindowlongptr). +> To write code that is compatible with both 32-bit and 64-bit versions of Windows, use [`CWindow::SetWindowLongPtr`](#setwindowlongptr). -## CWindow::SetWindowLongPtr +## `CWindow::SetWindowLongPtr` Changes an attribute of the specified window, and also sets a value at the specified offset in the extra window memory. @@ -2406,11 +2405,11 @@ LONG_PTR SetWindowLongPtr(int nIndex, LONG_PTR dwNewLong) throw(); ### Remarks -See [SetWindowLongPtr](/windows/win32/api/winuser/nf-winuser-setwindowlongptrw) in the Windows SDK. +See [`SetWindowLongPtr`](/windows/win32/api/winuser/nf-winuser-setwindowlongptrw) in the Windows SDK. This function supersedes the `CWindow::SetWindowLong` method. To write code that is compatible with both 32-bit and 64-bit versions of Windows, use `CWindow::SetWindowLongPtr`. -## CWindow::SetWindowPlacement +## `CWindow::SetWindowPlacement` Sets the show state and positions. @@ -2420,9 +2419,9 @@ BOOL SetWindowPlacement(const WINDOWPLACEMENT FAR* lpwndpl); ### Remarks -See [SetWindowPlacement](/windows/win32/api/winuser/nf-winuser-setwindowplacement) in the Windows SDK. +See [`SetWindowPlacement`](/windows/win32/api/winuser/nf-winuser-setwindowplacement) in the Windows SDK. -## CWindow::SetWindowPos +## `CWindow::SetWindowPos` Sets the size, position, and Z order. @@ -2443,11 +2442,11 @@ BOOL SetWindowPos( ### Remarks -See [SetWindowPos](/windows/win32/api/winuser/nf-winuser-setwindowpos) in the Windows SDK. +See [`SetWindowPos`](/windows/win32/api/winuser/nf-winuser-setwindowpos) in the Windows SDK. -The second version of this method uses a [RECT](/windows/win32/api/windef/ns-windef-rect) structure to set the window's new position, width, and height. +The second version of this method uses a [`RECT`](/windows/win32/api/windef/ns-windef-rect) structure to set the window's new position, width, and height. -## CWindow::SetWindowRgn +## `CWindow::SetWindowRgn` Sets the window region of a window. @@ -2457,9 +2456,9 @@ int SetWindowRgn(HRGN hRgn, BOOL bRedraw = FALSE) throw(); ### Remarks -See [SetWindowRgn](/windows/win32/api/winuser/nf-winuser-setwindowrgn) in the Windows SDK. +See [`SetWindowRgn`](/windows/win32/api/winuser/nf-winuser-setwindowrgn) in the Windows SDK. -## CWindow::SetWindowText +## `CWindow::SetWindowText` Changes the window's text. @@ -2469,13 +2468,13 @@ BOOL SetWindowText(LPCTSTR lpszString) throw(); ### Remarks -See [SetWindowText](/windows/win32/api/winuser/nf-winuser-setwindowtextw) in the Windows SDK. +See [`SetWindowText`](/windows/win32/api/winuser/nf-winuser-setwindowtextw) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#34](../../atl/codesnippet/cpp/cwindow-class_34.cpp)] -## CWindow::SetWindowWord +## `CWindow::SetWindowWord` Sets a 16-bit value at a specified offset into the extra window memory. @@ -2485,9 +2484,9 @@ WORD SetWindowWord(int nIndex, WORD wNewWord) throw(); ### Remarks -See [SetWindowLong](/windows/win32/api/winuser/nf-winuser-setwindowlongw) in the Windows SDK. +See [`SetWindowLong`](/windows/win32/api/winuser/nf-winuser-setwindowlongw) in the Windows SDK. -## CWindow::ShowCaret +## `CWindow::ShowCaret` Displays the system caret. @@ -2497,13 +2496,13 @@ BOOL ShowCaret() throw(); ### Remarks -See [ShowCaret](/windows/win32/api/winuser/nf-winuser-showcaret) in the Windows SDK. +See [`ShowCaret`](/windows/win32/api/winuser/nf-winuser-showcaret) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#35](../../atl/codesnippet/cpp/cwindow-class_35.cpp)] -## CWindow::ShowOwnedPopups +## `CWindow::ShowOwnedPopups` Shows or hides the pop-up windows owned by the window. @@ -2513,9 +2512,9 @@ BOOL ShowOwnedPopups(BOOL bShow = TRUE) throw(); ### Remarks -See [ShowOwnedPopups](/windows/win32/api/winuser/nf-winuser-showownedpopups) in the Windows SDK. +See [`ShowOwnedPopups`](/windows/win32/api/winuser/nf-winuser-showownedpopups) in the Windows SDK. -## CWindow::ShowScrollBar +## `CWindow::ShowScrollBar` Shows or hides a scroll bar. @@ -2525,9 +2524,9 @@ BOOL ShowScrollBar(UINT nBar, BOOL bShow = TRUE) throw(); ### Remarks -See [ShowScrollBar](/windows/win32/api/winuser/nf-winuser-showscrollbar) in the Windows SDK. +See [`ShowScrollBar`](/windows/win32/api/winuser/nf-winuser-showscrollbar) in the Windows SDK. -## CWindow::ShowWindow +## `CWindow::ShowWindow` Sets the window's show state. @@ -2537,13 +2536,13 @@ BOOL ShowWindow(int nCmdShow) throw(); ### Remarks -See [ShowWindow](/windows/win32/api/winuser/nf-winuser-showwindow) in the Windows SDK. +See [`ShowWindow`](/windows/win32/api/winuser/nf-winuser-showwindow) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#36](../../atl/codesnippet/cpp/cwindow-class_36.cpp)] -## CWindow::ShowWindowAsync +## `CWindow::ShowWindowAsync` Sets the show state of a window created by a different thread. @@ -2553,9 +2552,9 @@ BOOL ShowWindowAsync(int nCmdShow) throw(); ### Remarks -See [ShowWindowAsync](/windows/win32/api/winuser/nf-winuser-showwindowasync) in the Windows SDK. +See [`ShowWindowAsync`](/windows/win32/api/winuser/nf-winuser-showwindowasync) in the Windows SDK. -## CWindow::UpdateWindow +## `CWindow::UpdateWindow` Updates the client area. @@ -2565,13 +2564,13 @@ BOOL UpdateWindow() throw(); ### Remarks -See [UpdateWindow](/windows/win32/api/winuser/nf-winuser-updatewindow) in the Windows SDK. +See [`UpdateWindow`](/windows/win32/api/winuser/nf-winuser-updatewindow) in the Windows SDK. ### Example [!code-cpp[NVC_ATL_Windowing#37](../../atl/codesnippet/cpp/cwindow-class_37.cpp)] -## CWindow::ValidateRect +## `CWindow::ValidateRect` Validates the client area within the specified rectangle. @@ -2581,9 +2580,9 @@ BOOL ValidateRect(LPCRECT lpRect) throw(); ### Remarks -See [ValidateRect](/windows/win32/api/winuser/nf-winuser-validaterect) in the Windows SDK. +See [`ValidateRect`](/windows/win32/api/winuser/nf-winuser-validaterect) in the Windows SDK. -## CWindow::ValidateRgn +## `CWindow::ValidateRgn` Validates the client area within the specified region. @@ -2593,9 +2592,9 @@ BOOL ValidateRgn(HRGN hRgn) throw(); ### Remarks -See [ValidateRgn](/windows/win32/api/winuser/nf-winuser-validatergn) in the Windows SDK. +See [`ValidateRgn`](/windows/win32/api/winuser/nf-winuser-validatergn) in the Windows SDK. -## CWindow::WinHelp +## `CWindow::WinHelp` Starts Windows Help. @@ -2608,7 +2607,7 @@ BOOL WinHelp( ### Remarks -See [WinHelp](/windows/win32/api/winuser/nf-winuser-winhelpw) in the Windows SDK. +See [`WinHelp`](/windows/win32/api/winuser/nf-winuser-winhelpw) in the Windows SDK. ## See also diff --git a/docs/build/formatting-the-output-of-a-custom-build-step-or-build-event.md b/docs/build/formatting-the-output-of-a-custom-build-step-or-build-event.md index 14b67bab229..ca57975d28d 100644 --- a/docs/build/formatting-the-output-of-a-custom-build-step-or-build-event.md +++ b/docs/build/formatting-the-output-of-a-custom-build-step-or-build-event.md @@ -19,11 +19,11 @@ If the output of a custom build step or build event is formatted correctly, user The format of the output should be: -> {filename**(**line# \[**,** column#]**)** | *toolname*} **:** \[ any text ] {**error** | **warning**} code+number**:**localizable string \[ any text ] +> {filename**(**line# \[**,** column#]**)** \| *toolname*} **:** \[ any text ] {**error** \| **warning**} code+number**:**localizable string \[ any text ] Where: -- {*a* | *b*} is a choice of either *a* or *b*. +- {*a* \| *b*} is a choice of either *a* or *b*. - \[item] is an optional string or parameter. diff --git a/docs/build/reference/bscmake-options.md b/docs/build/reference/bscmake-options.md index 2bd54b3e3d5..9ec0fd7a184 100644 --- a/docs/build/reference/bscmake-options.md +++ b/docs/build/reference/bscmake-options.md @@ -30,7 +30,7 @@ Excludes the specified symbols from the browse information file. To specify mult **/Es**\ Excludes every include file specified with an absolute path, or found in an absolute path specified in the INCLUDE environment variable. (Usually, these files are the system include files, which contain much information you may not need in your browse information file.) This option doesn't exclude files specified without a path, or with relative paths, or files found in a relative path in INCLUDE. You can use the **/Ei** option along with **/Es** to exclude files that **/Es** doesn't exclude. If you want to exclude only some of the files, use **/Ei** instead of **/Es**, and list the files you want to exclude. -**/errorreport:**[**none** | **prompt** | **queue** | **send**]\ +**/errorreport:**[**none** \| **prompt** \| **queue** \| **send**]\ This option is deprecated. Starting in Windows Vista, error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. **/HELP**\ diff --git a/docs/build/reference/ltcg-link-time-code-generation.md b/docs/build/reference/ltcg-link-time-code-generation.md index e38ae4810e6..819e3a305a6 100644 --- a/docs/build/reference/ltcg-link-time-code-generation.md +++ b/docs/build/reference/ltcg-link-time-code-generation.md @@ -12,18 +12,18 @@ Use **`/LTCG`** to perform whole-program optimization, or to create profile-guid ## Syntax -> **`/LTCG`**[**`:`**{**`INCREMENTAL`**|**`NOSTATUS`**|**`STATUS`**|**`OFF`**}] +> **`/LTCG`**[**`:`**{**`INCREMENTAL`**\|**`NOSTATUS`**\|**`STATUS`**\|**`OFF`**}] These options are deprecated starting in Visual Studio 2015: -> **`/LTCG:`**{**`PGINSTRUMENT`**|**`PGOPTIMIZE`**|**`PGUPDATE`**} +> **`/LTCG:`**{**`PGINSTRUMENT`**\|**`PGOPTIMIZE`**\|**`PGUPDATE`**} ### Arguments **`INCREMENTAL`**
(Optional) Specifies that the linker only applies whole program optimization or link-time code generation (LTCG) to files affected by an edit, instead of the entire project. By default, this flag isn't set when **`/LTCG`** is specified, and the entire project is linked by using whole program optimization. -**`NOSTATUS`** | **`STATUS`**
+**`NOSTATUS`** \| **`STATUS`**
(Optional) Specifies whether the linker displays a progress indicator that shows what percentage of the link is complete. By default, this status information isn't displayed. **`OFF`**
diff --git a/docs/build/reference/makefile-preprocessing.md b/docs/build/reference/makefile-preprocessing.md index 82b1b9b4e82..ea2e4ada348 100644 --- a/docs/build/reference/makefile-preprocessing.md +++ b/docs/build/reference/makefile-preprocessing.md @@ -13,7 +13,7 @@ You can control the NMAKE session by using preprocessing directives and expressi Preprocessing directives aren't case-sensitive. The initial exclamation point (**`!`**) must appear at the beginning of the line. Zero or more spaces or tabs can appear after the exclamation point, for indentation. -- **`!CMDSWITCHES`** { **`+`**_option_ | **`-`**_option_ } ... +- **`!CMDSWITCHES`** { **`+`**_option_ \| **`-`**_option_ } ... Turns each listed *option* on or off. Spaces or tabs must appear before the **`+`** or **`-`** operator. No spaces can appear between the operator and the [option letters](running-nmake.md#nmake-options). Letters aren't case-sensitive and are specified without a slash (`/`). To turn on some options and turn off others, use separate specifications of **`!CMDSWITCHES`**. @@ -43,7 +43,7 @@ Preprocessing directives aren't case-sensitive. The initial exclamation point (* Processes statements between **`!IFNDEF`** and the next **`!ELSE`** or **`!ENDIF`** if *macro_name* isn't defined. -- **`!ELSE`** [ **`IF`** *constant_expression* | **`IFDEF`** *macro_name* | **`IFNDEF`** *macro_name* ] +- **`!ELSE`** [ **`IF`** *constant_expression* \| **`IFDEF`** *macro_name* \| **`IFNDEF`** *macro_name* ] Processes statements between **`!ELSE`** and the next **`!ENDIF`** if the prior **`!IF`**, **`!IFDEF`**, or **`!IFNDEF`** statement evaluated to zero. The optional keywords give further control of preprocessing. diff --git a/docs/build/reference/managing-a-library.md b/docs/build/reference/managing-a-library.md index 12b8cb236a3..fb27ae87eca 100644 --- a/docs/build/reference/managing-a-library.md +++ b/docs/build/reference/managing-a-library.md @@ -40,7 +40,7 @@ Overrides the default output filename. By default, the output library is created **/REMOVE:** *object*
Omits the specified *object* from the output library. LIB creates an output library by combining all objects (whether in object files or libraries), and then deleting any objects specified with /REMOVE. -**/SUBSYSTEM:**{**CONSOLE** | **EFI_APPLICATION** | **EFI_BOOT_SERVICE_DRIVER** | **EFI_ROM** | **EFI_RUNTIME_DRIVER** | **NATIVE** | **POSIX** | **WINDOWS** | **WINDOWSCE**}[,#[.##]]
+**/SUBSYSTEM:**{**CONSOLE** \| **EFI_APPLICATION** \| **EFI_BOOT_SERVICE_DRIVER** \| **EFI_ROM** \| **EFI_RUNTIME_DRIVER** \| **NATIVE** \| **POSIX** \| **WINDOWS** \| **WINDOWSCE**}[,#[.##]]
Tells the operating system how to run a program created by linking to the output library. For more information, see the description of the LINK [/SUBSYSTEM](subsystem-specify-subsystem.md) option. LIB options specified on the command line are not case sensitive. diff --git a/docs/build/reference/microsoft-extensions-to-c-and-cpp.md b/docs/build/reference/microsoft-extensions-to-c-and-cpp.md index 17f74d81fde..8a26372ab57 100644 --- a/docs/build/reference/microsoft-extensions-to-c-and-cpp.md +++ b/docs/build/reference/microsoft-extensions-to-c-and-cpp.md @@ -237,7 +237,7 @@ Under **/Ze**, you have to include iso646.h if you want to use text forms of the - & (bitand) -- | (bitor) +- \| (bitor) - ~ (compl) @@ -245,9 +245,9 @@ Under **/Ze**, you have to include iso646.h if you want to use text forms of the - != (not_eq) -- || (or) +- \|\| (or) -- |= (or_eq) +- \|= (or_eq) - ^ (xor) diff --git a/docs/build/reference/opt-optimizations.md b/docs/build/reference/opt-optimizations.md index 0c2494f2bfd..e02850e6243 100644 --- a/docs/build/reference/opt-optimizations.md +++ b/docs/build/reference/opt-optimizations.md @@ -18,7 +18,7 @@ Controls the optimizations that LINK performs during a build. ## Arguments -**REF** | **NOREF** +**REF** \| **NOREF** **/OPT:REF** eliminates functions and data that are never referenced; **/OPT:NOREF** keeps functions and data that are never referenced. @@ -30,7 +30,7 @@ By default, **/OPT:REF** is enabled by the linker unless **/OPT:NOREF** or [/DEB If [/DEBUG](debug-generate-debug-info.md) is specified, the default for **/OPT** is **NOREF**, and all functions are preserved in the image. To override this default and optimize a debug build, specify **/OPT:REF**. This can reduce the size of your executable, and can be a useful optimization even in debug builds. We recommend that you also specify **/OPT:NOICF** to preserve identical functions in debug builds. This makes it easier to read stack traces and set breakpoints in functions that would otherwise be folded together. -**ICF**\[**=**_iterations_] | **NOICF** +**ICF**\[**=**_iterations_] \| **NOICF** Use **ICF**\[**=**_iterations_] to perform identical COMDAT folding. Redundant COMDATs can be removed from the linker output. The optional *iterations* parameter specifies the number of times to traverse the symbols for duplicates. The default number of iterations is 1. Additional iterations may locate more duplicates that are uncovered through folding in the previous iteration. @@ -41,7 +41,7 @@ In a debug build, you must explicitly specify **/OPT:ICF** to enable COMDAT fold > [!NOTE] > Because **/OPT:ICF** can cause the same address to be assigned to different functions or read-only data members (that is, **`const`** variables when compiled by using **/Gy**), it can break a program that depends on unique addresses for functions or read-only data members. For more information, see [/Gy (Enable Function-Level Linking)](gy-enable-function-level-linking.md). -**LBR** | **NOLBR** +**LBR** \| **NOLBR** The **/OPT:LBR** and **/OPT:NOLBR** options apply only to ARM binaries. Because certain ARM processor branch instructions have a limited range, if the linker detects a jump to an out-of-range address, it replaces the branch instruction's destination address with the address of a code "island" that contains a branch instruction that targets the actual destination. You can use **/OPT:LBR** to optimize the detection of long branch instructions and the placement of intermediate code islands to minimize overall code size. **/OPT:NOLBR** instructs the linker to generate code islands for long branch instructions as they are encountered, without optimization. diff --git a/docs/build/reference/running-lib.md b/docs/build/reference/running-lib.md index f469017355d..0bfac11edc4 100644 --- a/docs/build/reference/running-lib.md +++ b/docs/build/reference/running-lib.md @@ -32,7 +32,7 @@ An option consists of an option specifier, which is either a dash (**-**) or a f The following options apply to all modes of LIB: -> **/ERRORREPORT** \[**NONE** | **PROMPT** | **QUEUE** | **SEND**] +> **/ERRORREPORT** \[**NONE** \| **PROMPT** \| **QUEUE** \| **SEND**] The /ERRORREPORT option is deprecated. Starting in Windows Vista, error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. diff --git a/docs/build/reference/running-nmake.md b/docs/build/reference/running-nmake.md index a2b87e99202..ad7fa7d7b79 100644 --- a/docs/build/reference/running-nmake.md +++ b/docs/build/reference/running-nmake.md @@ -27,7 +27,7 @@ NMAKE options are described in the following table. Options are preceded by eith | **`/C`** | Suppresses default output, including nonfatal NMAKE errors or warnings, timestamps, and NMAKE copyright message. Suppresses warnings issued by **`/K`**. | | **`/D`** | Displays timestamps of each evaluated target and dependent and a message when a target doesn't exist. Useful with **`/P`** for debugging a makefile. Use `!CMDSWITCHES` to set or clear **`/D`** for part of a makefile. | | **`/E`** | Causes environment variables to override makefile macro definitions. | -| **`/ERRORREPORT`** [ **`NONE`** | **`PROMPT`** | **`QUEUE`** | **`SEND`** ] | Deprecated. [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings control reporting. | +| **`/ERRORREPORT`** [ **`NONE`** \| **`PROMPT`** \| **`QUEUE`** \| **`SEND`** ] | Deprecated. [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings control reporting. | | **`/F`** *filename* | Specifies *filename* as a makefile. Spaces or tabs can precede *filename*. Specify **`/F`** once for each makefile. To supply a makefile from standard input, specify a dash (`-`) for *filename*, and end keyboard input with either **F6** or **CTRL+Z**. | | **`/G`** | Displays the makefiles included with the `!INCLUDE` directive. For more information, see [Makefile preprocessing directives](makefile-preprocessing.md#makefile-preprocessing-directives). | | **`/HELP`**, **`/?`** | Displays a brief summary of NMAKE command-line syntax. | diff --git a/docs/build/working-with-project-properties.md b/docs/build/working-with-project-properties.md index 1e6c5ddd665..9a6b533a192 100644 --- a/docs/build/working-with-project-properties.md +++ b/docs/build/working-with-project-properties.md @@ -94,7 +94,7 @@ When you add an include directory to a project, it's important not to override a ## Quickly browse and search all properties -The **All Options** property page (under the **Configuration Properties | C/C++** node in the **Property Pages** dialog box) provides a quick way to browse and search the properties that are available in the current context. It has a special search box and a simple syntax to help you filter results: +The **All Options** property page (under the **Configuration Properties** > **C/C++** node in the **Property Pages** dialog box) provides a quick way to browse and search the properties that are available in the current context. It has a special search box and a simple syntax to help you filter results: No prefix:\ Search in property names only (case-insensitive substring). diff --git a/docs/c-language/c-bitwise-operators.md b/docs/c-language/c-bitwise-operators.md index 7d21966e18b..8fa87f5bae6 100644 --- a/docs/c-language/c-bitwise-operators.md +++ b/docs/c-language/c-bitwise-operators.md @@ -7,7 +7,7 @@ ms.assetid: e22127b1-9a2d-4876-b01d-c8f72cec3317 --- # C Bitwise Operators -The bitwise operators perform bitwise-AND (**&**), bitwise-exclusive-OR (**^**), and bitwise-inclusive-OR (**|**) operations. +The bitwise operators perform bitwise-AND (**&**), bitwise-exclusive-OR (**^**), and bitwise-inclusive-OR (**\|**) operations. ## Syntax @@ -21,7 +21,7 @@ The bitwise operators perform bitwise-AND (**&**), bitwise-exclusive-OR (**^**), *inclusive-OR-expression*:   *exclusive-OR-expression* -  *inclusive-OR-expression* | *exclusive-OR-expression* +  *inclusive-OR-expression* \| *exclusive-OR-expression* The operands of bitwise operators must have integral types, but their types can be different. These operators perform the usual arithmetic conversions; the type of the result is the type of the operands after conversion. @@ -31,7 +31,7 @@ The C bitwise operators are described below: |--------------|-----------------| |**&**|The bitwise-AND operator compares each bit of its first operand to the corresponding bit of its second operand. If both bits are 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.| |**^**|The bitwise-exclusive-OR operator compares each bit of its first operand to the corresponding bit of its second operand. If one bit is 0 and the other bit is 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.| -|**|**|The bitwise-inclusive-OR operator compares each bit of its first operand to the corresponding bit of its second operand. If either bit is 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.| +|**\|**|The bitwise-inclusive-OR operator compares each bit of its first operand to the corresponding bit of its second operand. If either bit is 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.| ## Examples @@ -74,4 +74,4 @@ The result of the bitwise AND is 96 decimal. [Bitwise AND Operator: &](../cpp/bitwise-and-operator-amp.md)
[Bitwise Exclusive OR Operator: ^](../cpp/bitwise-exclusive-or-operator-hat.md)
-[Bitwise Inclusive OR Operator: |](../cpp/bitwise-inclusive-or-operator-pipe.md) +[Bitwise Inclusive OR Operator: \|](../cpp/bitwise-inclusive-or-operator-pipe.md) diff --git a/docs/c-language/c-logical-operators.md b/docs/c-language/c-logical-operators.md index 387ee79abe3..542ae3e99be 100644 --- a/docs/c-language/c-logical-operators.md +++ b/docs/c-language/c-logical-operators.md @@ -17,7 +17,7 @@ The logical operators perform logical-AND (**&&**) and logical-OR (**||**) opera *logical-OR-expression*:
    *logical-AND-expression*
-    *logical-OR-expression* **||** *logical-AND-expression* +    *logical-OR-expression* **\|\|** *logical-AND-expression* ## Remarks @@ -28,7 +28,7 @@ The C logical operators are described below: |Operator|Description| |--------------|-----------------| |**&&**|The logical-AND operator produces the value 1 if both operands have nonzero values. If either operand is equal to 0, the result is 0. If the first operand of a logical-AND operation is equal to 0, the second operand is not evaluated.| -|**||**|The logical-OR operator performs an inclusive-OR operation on its operands. The result is 0 if both operands have 0 values. If either operand has a nonzero value, the result is 1. If the first operand of a logical-OR operation has a nonzero value, the second operand is not evaluated.| +|**\|\|**|The logical-OR operator performs an inclusive-OR operation on its operands. The result is 0 if both operands have 0 values. If either operand has a nonzero value, the result is 1. If the first operand of a logical-OR operation has a nonzero value, the second operand is not evaluated.| The operands of logical-AND and logical-OR expressions are evaluated from left to right. If the value of the first operand is sufficient to determine the result of the operation, the second operand is not evaluated. This is called "short-circuit evaluation." There is a sequence point after the first operand. See [Sequence Points](../c-language/c-sequence-points.md) for more information. @@ -54,4 +54,4 @@ In this example, if `x` is equal to either `w`, `y`, or `z`, the second argument ## See also - [Logical AND Operator: &&](../cpp/logical-and-operator-amp-amp.md) -- [Logical OR Operator: ||](../cpp/logical-or-operator-pipe-pipe.md) +- [Logical OR Operator: \|\|](../cpp/logical-or-operator-pipe-pipe.md) diff --git a/docs/c-language/c-operators.md b/docs/c-language/c-operators.md index ef33061499f..0829d45732d 100644 --- a/docs/c-language/c-operators.md +++ b/docs/c-language/c-operators.md @@ -29,8 +29,8 @@ Binary operators associate from left to right. C provides the following binary o |**+** **-**|Additive operators| |**\<\<** **>>**|Shift operators| |**\<** **>** **\<=** **>=** **==** **!=**|Relational operators| -|**&** **|** **^**|Bitwise operators| -|**&&** **||**|Logical operators| +|**&** **\|** **^**|Bitwise operators| +|**&&** **\|\|**|Logical operators| |**,**|Sequential-evaluation operator| The base operator (**:>**), supported by previous versions of the Microsoft 16-bit C compiler, is described in [C Language Syntax Summary](../c-language/c-language-syntax-summary.md). diff --git a/docs/c-runtime-library/reference/rand-s.md b/docs/c-runtime-library/reference/rand-s.md index 28de721e498..d61282cc4b3 100644 --- a/docs/c-runtime-library/reference/rand-s.md +++ b/docs/c-runtime-library/reference/rand-s.md @@ -9,9 +9,9 @@ topic_type: ["apiref"] f1_keywords: ["rand_s"] helpviewer_keywords: ["generating pseudorandom numbers", "random numbers, cryptographically secure", "random numbers, generating", "rand_s function", "numbers, pseudorandom", "cryptographically secure random numbers", "pseudorandom numbers", "numbers, generating pseudorandom"] --- -# rand_s +# `rand_s` -Generates a pseudorandom number. This is a more secure version of the function [rand](rand.md), with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). +Generates a pseudorandom number. This is a more secure version of the function [`rand`](rand.md), with security enhancements as described in [Security Features in the CRT](../../c-runtime-library/security-features-in-the-crt.md). ## Syntax @@ -21,33 +21,33 @@ errno_t rand_s(unsigned int* randomValue); ### Parameters -*randomValue*
+*`randomValue`*\ A pointer to an integer to hold the generated value. ## Return Value -Zero if successful, otherwise, an error code. If the input pointer _randomValue_ is a null pointer, the function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **EINVAL** and sets **errno** to **EINVAL**. If the function fails for any other reason, *_randomValue_ is set to 0. +Zero if successful, otherwise, an error code. If the input pointer `_randomValue_` is a `NULL` pointer, the function invokes an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns **`EINVAL`** and sets **`errno`** to **`EINVAL`**. If the function fails for any other reason, `*_randomValue_` is set to 0. ## Remarks -The **rand_s** function writes a pseudorandom integer in the range 0 to **UINT_MAX** to the input pointer. The **rand_s** function uses the operating system to generate cryptographically secure random numbers. It does not use the seed generated by the [srand](srand.md) function, nor does it affect the random number sequence used by [rand](rand.md). +The **`rand_s`** function writes a pseudorandom integer in the range 0 to **`UINT_MAX`** to the input pointer. The **`rand_s`** function uses the operating system to generate cryptographically secure random numbers. It doesn't use the seed generated by the [`srand`](srand.md) function, nor does it affect the random number sequence used by [`rand`](rand.md). -The **rand_s** function requires that constant **_CRT_RAND_S** be defined prior to the inclusion statement for the function to be declared, as in the following example: +The **`rand_s`** function requires that constant **`_CRT_RAND_S`** be defined prior to the inclusion statement for the function to be declared, as in the following example: -```C By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md). +```C #define _CRT_RAND_S #include ``` -**rand_s** depends on the [RtlGenRandom](/windows/win32/api/ntsecapi/nf-ntsecapi-rtlgenrandom) API, which is only available in Windows XP and later. +**`rand_s`** depends on the [`RtlGenRandom`](/windows/win32/api/ntsecapi/nf-ntsecapi-rtlgenrandom) API, which is only available in Windows XP and later. ## Requirements |Routine|Required header| |-------------|---------------------| -|**rand_s**|\| +|**`rand_s`**|``| For more information, see [Compatibility](../../c-runtime-library/compatibility.md). @@ -129,6 +129,6 @@ int main( void ) ## See also -[Floating-Point Support](../../c-runtime-library/floating-point-support.md)
-[rand](rand.md)
-[srand](srand.md)
+[Floating-Point Support](../../c-runtime-library/floating-point-support.md)\ +[`rand`](rand.md)\ +[`srand`](srand.md) diff --git a/docs/code-quality/c6235.md b/docs/code-quality/c6235.md index c7ee95d2df8..bafc70190fa 100644 --- a/docs/code-quality/c6235.md +++ b/docs/code-quality/c6235.md @@ -9,7 +9,7 @@ ms.assetid: e225955e-0bb5-43a4-a83d-83290e209df4 --- # C6235 -> warning C6235: (\ || \) is always a non-zero constant +> warning C6235: (\ \|\| \) is always a non-zero constant This warning indicates that a non-zero constant value, other than one, was detected on the left side of a logical-or operation that occurs in a test context. The right side of the logical-or operation is not evaluated because the resulting expression always evaluates to true. This is referred to as "short-circuit evaluation." diff --git a/docs/code-quality/c6236.md b/docs/code-quality/c6236.md index 0f752ac985a..3ce9710077d 100644 --- a/docs/code-quality/c6236.md +++ b/docs/code-quality/c6236.md @@ -9,7 +9,7 @@ ms.assetid: 3d5ae268-6f40-4c45-a483-b5b0e6a808fc --- # C6236 -> warning C6236: (\ || \) is always a non-zero constant +> warning C6236: (\ \|\| \) is always a non-zero constant This warning indicates that a non-zero constant value, other than one, was detected on the right side of a logical OR operation that occurs in a test context. Logically, this implies that the test is redundant and can be removed safely. Alternatively, it suggests that the programmer may have intended to use a different operator, for example, the equality (`==`), bitwise-AND (`&`) or bitwise-XOR (`^`) operator, to test for a specific value or flag. diff --git a/docs/code-quality/c6281.md b/docs/code-quality/c6281.md index 4aa6af6034b..1b28775d044 100644 --- a/docs/code-quality/c6281.md +++ b/docs/code-quality/c6281.md @@ -11,7 +11,7 @@ ms.assetid: d0182269-8403-486b-ac3f-325522871bb1 > warning C6281 - incorrect order of operations: relational operators have higher precedence than bitwise operators -This warning indicates a possible error in the operator precedence. This might produce incorrect results. You should check the precedence and use parentheses to clarify the intent. Relational operators (\<, >, \<=, >=, ==, != ) have higher precedence than bitwise operators (& | ^). +This warning indicates a possible error in the operator precedence, which might produce incorrect results. You should check the precedence and use parentheses to clarify the intent. Relational operators (`<`, `>`, `<=`, `>=`, `==`, `!=`) have higher precedence than bitwise operators (`&`, `|`, `^`). ## Example diff --git a/docs/code-quality/c6285.md b/docs/code-quality/c6285.md index 03410e822a9..cc9b48bc68f 100644 --- a/docs/code-quality/c6285.md +++ b/docs/code-quality/c6285.md @@ -9,7 +9,7 @@ ms.assetid: f5bc6d3d-d33b-42c8-98d2-92ec8ab17193 --- # C6285 -> warning C6285: (\ || \) is always a non-zero constant. Did you intend to use the bitwise-and operator? +> warning C6285: (\ \|\| \) is always a non-zero constant. Did you intend to use the bitwise-and operator? This warning indicates that two constant values, both greater than one, were detected as arguments to a logical-or operation that occurs in a test context. This expression is always TRUE. diff --git a/docs/code-quality/c6286.md b/docs/code-quality/c6286.md index fa95e54211b..6cf192437d0 100644 --- a/docs/code-quality/c6286.md +++ b/docs/code-quality/c6286.md @@ -9,13 +9,13 @@ ms.assetid: c79c5d4a-c02b-4b98-891a-d79e471f9da7 --- # C6286 -> warning C6286: (\ || \) is always a non-zero constant. \ is never evaluated and may have side effects +> warning C6286: (\ \|\| \) is always a non-zero constant. \ is never evaluated and may have side effects This warning indicates that a non-zero constant was detected on the left side of a logical-or operation that occurs in a test context. The resulting expression always evaluates to TRUE. In addition, the right side of the expression appears to have side effects, and they will be lost. This warning indicates that you may want to examine the right side of the expression carefully to ensure that any side effects needed for proper functionality are not lost. -The `(!0 || `) construction is commonly used to force execution of a controlled block. +The `(!0 || )` construction is commonly used to force execution of a controlled block. ## Example @@ -70,4 +70,4 @@ void f() ## See also -[Logical OR Operator: ||](../cpp/logical-or-operator-pipe-pipe.md) +[Logical OR Operator: \|\|](../cpp/logical-or-operator-pipe-pipe.md) diff --git a/docs/code-quality/c6288.md b/docs/code-quality/c6288.md index 875cdd30ec6..7cffbca563f 100644 --- a/docs/code-quality/c6288.md +++ b/docs/code-quality/c6288.md @@ -9,9 +9,9 @@ ms.assetid: 3856b80a-c9f2-4e86-97fc-c913b0186788 --- # C6288 -> warning C6288: Incorrect operator: mutual inclusion over && is always zero. Did you intent to use || instead? +> warning C6288: Incorrect operator: mutual inclusion over && is always zero. Did you intend to use \|\| instead? -This warning indicates that in a test expression, a variable is being tested against two different constants and the result depends on both conditions being true. The code in these cases indicates that the programmer's intent is not captured correctly. It is important to examine the code and correct the problem; otherwise your code will not behave the way you expected it to. +This warning indicates that in a test expression, a variable is being tested against two different constants and the result depends on both conditions being true. The code in these cases indicates that the programmer's intent isn't captured correctly. It's important to examine the code and correct the problem. Otherwise, your code won't behave the way you expected it to. This problem is generally caused by using `&&`; in place of `||`, but can also be caused by using `==` where `!=` was intended. diff --git a/docs/code-quality/c6289.md b/docs/code-quality/c6289.md index ab7c4126974..918a383f0e1 100644 --- a/docs/code-quality/c6289.md +++ b/docs/code-quality/c6289.md @@ -9,7 +9,7 @@ ms.assetid: 0fe09974-7577-468b-91a0-62dbe915443e --- # C6289 -> warning C6289: Incorrect operator: mutual exclusion over || is always a non-zero constant. Did you intend to use && instead? +> warning C6289: Incorrect operator: mutual exclusion over \|\| is always a non-zero constant. Did you intend to use && instead? This warning indicates that in a test expression a variable is being tested against two different constants and the result depends on either condition being true. This always evaluates to true. diff --git a/docs/code-quality/c6291.md b/docs/code-quality/c6291.md index 0c875341515..265926e5186 100644 --- a/docs/code-quality/c6291.md +++ b/docs/code-quality/c6291.md @@ -9,7 +9,7 @@ ms.assetid: d0457386-e403-43fa-b959-5b6a495fab42 --- # C6291 -> warning C6291: Bitwise operation on logical result: ! has higher precedence than |. Use || or (!(x | y)) instead +> warning C6291: Bitwise operation on logical result: ! has higher precedence than \|. Use \|\| or (!(x \| y)) instead The `!` operator yields a Boolean result, and the `|` (bitwise-or) operator takes two arithmetic arguments. The `!` operator also has higher precedence than `|`. diff --git a/docs/code-quality/c6314.md b/docs/code-quality/c6314.md index b63dc08613a..6a637411ea4 100644 --- a/docs/code-quality/c6314.md +++ b/docs/code-quality/c6314.md @@ -41,5 +41,5 @@ int f(int SignalValue) ## See also -- [Bitwise Inclusive OR Operator: |](../cpp/bitwise-inclusive-or-operator-pipe.md) +- [Bitwise Inclusive OR Operator: \|](../cpp/bitwise-inclusive-or-operator-pipe.md) - [Conditional Operator: ? :](../cpp/conditional-operator-q.md) diff --git a/docs/code-quality/c6331.md b/docs/code-quality/c6331.md index 85f486d027c..08361c89ee3 100644 --- a/docs/code-quality/c6331.md +++ b/docs/code-quality/c6331.md @@ -11,7 +11,7 @@ ms.assetid: cb1ecc2c-29a5-4c57-acf2-0954a4c047b1 > warning C6331: Invalid parameter: passing MEM_RELEASE and MEM_DECOMMIT in conjunction to \ is not allowed. This results in the failure of this call -This message indicates that an invalid parameter being passed to VirtualFree or VirtualFreeEx. VirtualFree and VirtualFreeEx both reject the flags (MEM_RELEASE | MEM_DECOMMIT) in combination. Therefore, the values MEM_DECOMMIT and MEM_RELEASE may not be used together in the same call. +This message indicates that an invalid parameter is passed to `VirtualFree` or `VirtualFreeEx`. `VirtualFree` and `VirtualFreeEx` both reject the flags (`MEM_RELEASE | MEM_DECOMMIT`) in combination. Therefore, the values `MEM_DECOMMIT` and `MEM_RELEASE` may not be used together in the same call. It is not required for decommit and release to occur as independent steps. Releasing committed memory will decommit the pages as well. Also, ensure the return value of this function is not ignored. diff --git a/docs/cpp/attributes.md b/docs/cpp/attributes.md index 82f2d0bcc52..faa8eeb9e84 100644 --- a/docs/cpp/attributes.md +++ b/docs/cpp/attributes.md @@ -50,7 +50,11 @@ Attributes represent a standardized alternative to vendor-specific extensions su } ``` -- `[[maybe_unused]]` **Visual Studio 2017 version 15.3 and later:** (Available with [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies that a variable, function, class, typedef, non-static data member, enum, or template specialization may intentionally not be used. The compiler doesn't warn when an entity marked `[[maybe_unused]]` isn't used. An entity that's declared without the attribute can later be redeclared with the attribute and vice-versa. An entity is considered *marked* after its first declaration that's marked `[[maybe_unused]]` gets analyzed, and for the rest of the current translation unit. +- `[[maybe_unused]]` **Visual Studio 2017 version 15.3 and later:** (Available with [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies that a variable, function, class, typedef, non-static data member, enum, or template specialization may be intentionally unused. The compiler doesn't warn when an entity marked `[[maybe_unused]]` isn't used. An entity that's declared without the attribute can later be redeclared with the attribute and vice-versa. An entity is considered *marked* after its first declaration that's marked `[[maybe_unused]]` gets analyzed, and for the rest of the current translation unit. + +- `[[likely]]` **Visual Studio 2019 version 16.6 and later:** (Available with [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies a hint to the compiler that the code path for the attributed label or statement is more likely to execute than alternatives. In the Microsoft compiler, the `[[likely]]` attribute marks blocks as "hot code", which increments an internal optimization score. The score is incremented more when optimizing for speed, and not as much when optimizing for size. The net score affects the likelihood of inlining, loop unrolling, and vectorizing optimizations. The effect of `[[likely]]` and `[[unlikely]]` is similar to [Profile-guided optimization](../build/profile-guided-optimizations.md), but limited in scope to the current translation unit. + +- `[[unlikely]]` **Visual Studio 2019 version 16.6 and later:** (Available with [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) and later.) Specifies a hint to the compiler that the code path for the attributed label or statement is less likely to execute than alternatives. In the Microsoft compiler, the `[[unlikely]]` attribute marks blocks as "cold code", which decrements an internal optimization score. The score is decremented more when optimizing for size, and not as much when optimizing for speed. The net score affects the likelihood of inlining, loop unrolling, and vectorizing optimizations. ## Microsoft-specific attributes diff --git a/docs/cpp/binary-operators.md b/docs/cpp/binary-operators.md index c0e9f3a8cea..9c31087e1fe 100644 --- a/docs/cpp/binary-operators.md +++ b/docs/cpp/binary-operators.md @@ -42,9 +42,9 @@ The following table shows a list of operators that can be overloaded. |**>>=**|Right shift/assignment| |**^**|Exclusive OR| |**^=**|Exclusive OR/assignment| -|**|**|Bitwise inclusive OR| -|**|=**|Bitwise inclusive OR/assignment| -|**||**|Logical OR| +|**\|**|Bitwise inclusive OR| +|**\|=**|Bitwise inclusive OR/assignment| +|**\|\|**|Logical OR| To declare a binary operator function as a nonstatic member, you must declare it in the form: diff --git a/docs/cpp/bitwise-inclusive-or-operator-pipe.md b/docs/cpp/bitwise-inclusive-or-operator-pipe.md index d232bb18b93..d148fa4bae0 100644 --- a/docs/cpp/bitwise-inclusive-or-operator-pipe.md +++ b/docs/cpp/bitwise-inclusive-or-operator-pipe.md @@ -1,12 +1,12 @@ --- -title: "Bitwise inclusive OR operator: |" +title: "Bitwise inclusive OR operator: |" description: "The C++ standard language bitwise inclusive OR operator syntax and use." ms.date: 07/23/2020 f1_keywords: ["|", "bitor_cpp"] helpviewer_keywords: ["OR operator [C++], bitwise inclusive", "bitwise operators [C++], OR operator", "inclusive OR operator", "| operator"] ms.assetid: 4c8a6a68-d828-447d-875a-aedb4ce3aa9a --- -# Bitwise inclusive OR operator: | +# Bitwise inclusive OR operator: `|` ## Syntax @@ -18,7 +18,7 @@ The bitwise inclusive OR operator (**`|`**) compares each bit of its first opera Both operands to the operator must have integral types. The usual arithmetic conversions covered in [Standard Conversions](standard-conversions.md) are applied to the operands. -## Operator keyword for | +## Operator keyword for `|` C++ specifies **`bitor`** as an alternative spelling for **`|`**. In C, the alternative spelling is provided as a macro in the \ header. In C++, the alternative spelling is a keyword; use of \ or the C++ equivalent \ is deprecated. In Microsoft C++, the [`/permissive-`](../build/reference/permissive-standards-conformance.md) or [`/Za`](../build/reference/za-ze-disable-language-extensions.md) compiler option is required to enable the alternative spelling. diff --git a/docs/cpp/declspec.md b/docs/cpp/declspec.md index 54d4b52ba82..943b883ad3a 100644 --- a/docs/cpp/declspec.md +++ b/docs/cpp/declspec.md @@ -38,7 +38,7 @@ The extended attribute syntax for specifying storage-class information uses the  **`novtable`**\  **`no_sanitize_address`**\  **`process`**\ - **`property(`** { **`get=`**_get-func-name_ | **`,put=`**_put-func-name_ } **`)`**\ + **`property(`** { **`get=`**_get-func-name_ \| **`,put=`**_put-func-name_ } **`)`**\  **`restrict`**\  **`safebuffers`**\  **`selectany`**\ diff --git a/docs/cpp/expressions-with-binary-operators.md b/docs/cpp/expressions-with-binary-operators.md index 8c55d441d85..e43b8965491 100644 --- a/docs/cpp/expressions-with-binary-operators.md +++ b/docs/cpp/expressions-with-binary-operators.md @@ -49,13 +49,13 @@ Binary operators act on two operands in an expression. The binary operators are: - [Bitwise exclusive OR (^)](../cpp/bitwise-exclusive-or-operator-hat.md) - - [Bitwise inclusive OR (|)](../cpp/bitwise-inclusive-or-operator-pipe.md) + - [Bitwise inclusive OR (\|)](../cpp/bitwise-inclusive-or-operator-pipe.md) - Logical operators - [Logical AND (&&)](../cpp/logical-and-operator-amp-amp.md) - - [Logical OR (||)](../cpp/logical-or-operator-pipe-pipe.md) + - [Logical OR (\|\|)](../cpp/logical-or-operator-pipe-pipe.md) - [Assignment operators](../cpp/assignment-operators.md) @@ -79,7 +79,7 @@ Binary operators act on two operands in an expression. The binary operators are: - Bitwise exclusive OR assignment (^=) - - Bitwise inclusive OR assignment (|=) + - Bitwise inclusive OR assignment (\|=) - [Comma Operator](../cpp/comma-operator.md) (,) diff --git a/docs/cpp/logical-or-operator-pipe-pipe.md b/docs/cpp/logical-or-operator-pipe-pipe.md index 4973a31400e..8533e8f8b16 100644 --- a/docs/cpp/logical-or-operator-pipe-pipe.md +++ b/docs/cpp/logical-or-operator-pipe-pipe.md @@ -1,12 +1,12 @@ --- -title: "Logical OR operator: ||" +title: "Logical OR operator: ||" description: "The C++ standard language logical OR operator syntax and use." ms.date: 07/23/2020 f1_keywords: ["||", "or_cpp"] helpviewer_keywords: ["OR operator [C++], logical", "|| operator", "OR operator", "logical OR operator"] ms.assetid: 31837c99-2655-4bf3-8ded-f13b7a9dc533 --- -# Logical OR operator: || +# Logical OR operator: `||` ## Syntax @@ -28,7 +28,7 @@ printf( "%d" , (x == w || x == y || x == z) ); In the above example, if `x` is equal to either `w`, `y`, or `z`, the second argument to the `printf` function evaluates to **`true`**, which is then promoted to an integer, and the value 1 is printed. Otherwise, it evaluates to **`false`** and the value 0 is printed. As soon as one of the conditions evaluates to **`true`**, evaluation stops. -## Operator keyword for || +## Operator keyword for `||` C++ specifies **`or`** as an alternative spelling for **`||`**. In C, the alternative spelling is provided as a macro in the \ header. In C++, the alternative spelling is a keyword; use of \ or the C++ equivalent \ is deprecated. In Microsoft C++, the [`/permissive-`](../build/reference/permissive-standards-conformance.md) or [`/Za`](../build/reference/za-ze-disable-language-extensions.md) compiler option is required to enable the alternative spelling. diff --git a/docs/cpp/operator-overloading.md b/docs/cpp/operator-overloading.md index ace83194aa2..58964423c57 100644 --- a/docs/cpp/operator-overloading.md +++ b/docs/cpp/operator-overloading.md @@ -63,9 +63,9 @@ The name of an overloaded operator is **`operator`** *x*, where *x* is the opera |**[ ]**|Array subscript|—| |**^**|Exclusive OR|Binary| |**^=**|Exclusive OR assignment|Binary| -|**|**|Bitwise inclusive OR|Binary| -|**|=**|Bitwise inclusive OR assignment|Binary| -|**||**|Logical OR|Binary| +|**\|**|Bitwise inclusive OR|Binary| +|**\|=**|Bitwise inclusive OR assignment|Binary| +|**\|\|**|Logical OR|Binary| |**~**|One's complement|Unary| |**`delete`**|Delete|—| |**`new`**|New|—| diff --git a/docs/cpp/semantics-of-expressions.md b/docs/cpp/semantics-of-expressions.md index 778bec6d035..9c541b6a286 100644 --- a/docs/cpp/semantics-of-expressions.md +++ b/docs/cpp/semantics-of-expressions.md @@ -85,9 +85,9 @@ An expression can modify an object's value only once between consecutive "sequen The C++ language definition does not currently specify sequence points. Microsoft C++ uses the same sequence points as ANSI C for any expression involving C operators and not involving overloaded operators. When operators are overloaded, the semantics change from operator sequencing to function-call sequencing. Microsoft C++ uses the following sequence points: -- Left operand of the logical AND operator (&&). The left operand of the logical AND operator is completely evaluated and all side effects completed before continuing. There is no guarantee that the right operand of the logical AND operator will be evaluated. +- Left operand of the logical AND operator (`&&`). The left operand of the logical AND operator is completely evaluated and all side effects completed before continuing. There's no guarantee that the right operand of the logical AND operator will be evaluated. -- Left operand of the logical OR operator (||). The left operand of the logical OR operator is completely evaluated and all side effects completed before continuing. There is no guarantee that the right operand of the logical OR operator will be evaluated. +- Left operand of the logical OR operator (`||`). The left operand of the logical OR operator is completely evaluated and all side effects completed before continuing. There's no guarantee that the right operand of the logical OR operator will be evaluated. - Left operand of the comma operator. The left operand of the comma operator is completely evaluated and all side effects completed before continuing. Both operands of the comma operator are always evaluated. diff --git a/docs/cppcx/compiler-and-linker-options-c-cx.md b/docs/cppcx/compiler-and-linker-options-c-cx.md index f8597586f69..ff2700a08ad 100644 --- a/docs/cppcx/compiler-and-linker-options-c-cx.md +++ b/docs/cppcx/compiler-and-linker-options-c-cx.md @@ -26,7 +26,7 @@ The %LIBPATH% environment variable specifies the default path to search for .win |Option|Description| |------------|-----------------| |/APPCONTAINER[:NO]|Marks the executable as runnable in the appcontainer (only).| -|/WINMD[:{NO|ONLY}]|Emits a .winmd file and an associated binary file. This option must be passed to the linker for a .winmd to be emitted.

**NO**—Doesn't emit a .winmd file, but does emit a binary file.

**ONLY**—Emits a .winmd file, but doesn't emit a binary file.| +|/WINMD[:{NO\|ONLY}]|Emits a .winmd file and an associated binary file. This option must be passed to the linker for a .winmd to be emitted.

**NO**—Doesn't emit a .winmd file, but does emit a binary file.

**ONLY**—Emits a .winmd file, but doesn't emit a binary file.| |/WINMDFILE:*filename*|The name of the .winmd file to emit, instead of the default .winmd file name. If multiple file names are specified on the command line, the last name is used.| |/WINMDDELAYSIGN[:NO]|Partially signs the .winmd file and places the public key in the binary.

**NO**—(Default) Doesn't sign the .winmd file.

/WINMDDELAYSIGN has no effect unless /WINMDKEYFILE or /WINMDKEYCONTAINER is also specified.| |/WINMDKEYCONTAINER:*name*|Specifies a key container to sign an assembly. The *name* parameter corresponds to the key container that's used to sign the metadata file.| diff --git a/docs/dotnet/hosting-a-windows-form-user-control-in-an-mfc-dialog-box.md b/docs/dotnet/hosting-a-windows-form-user-control-in-an-mfc-dialog-box.md index 178581d23a2..b7b889caf1a 100644 --- a/docs/dotnet/hosting-a-windows-form-user-control-in-an-mfc-dialog-box.md +++ b/docs/dotnet/hosting-a-windows-form-user-control-in-an-mfc-dialog-box.md @@ -22,7 +22,10 @@ MFC hosts a Windows Forms control as a special kind of ActiveX control and commu ## Reference -[CWinFormsControl Class](../mfc/reference/cwinformscontrol-class.md) | [CDialog Class](../mfc/reference/cdialog-class.md) | [CWnd Class](../mfc/reference/cwnd-class.md) | +[`CWinFormsControl` Class](../mfc/reference/cwinformscontrol-class.md)\ +[`CDialog` Class](../mfc/reference/cdialog-class.md)\ +[`CWnd` Class](../mfc/reference/cwnd-class.md)\ + ## See also diff --git a/docs/dotnet/how-to-define-and-consume-enums-in-cpp-cli.md b/docs/dotnet/how-to-define-and-consume-enums-in-cpp-cli.md index 33d95fd07eb..d09b7d56c85 100644 --- a/docs/dotnet/how-to-define-and-consume-enums-in-cpp-cli.md +++ b/docs/dotnet/how-to-define-and-consume-enums-in-cpp-cli.md @@ -73,20 +73,20 @@ a and day2 are the same The following operators are valid on enums in C++/CLI: -|Operator| -|--------------| -|== != \< > \<= >=| -|+ -| -|| ^ & ~| -|++ --| -|sizeof| +| Operator | +|--| +| `==` `!=` `<` `>` `<=` `>=` | +| `+` `-` | +| `|` `^` `&` `~` | +| `++` `--` | +| `sizeof` | -Operators | ^ & ~ ++ -- are defined only for enumerations with integral underlying types, not including bool. Both operands must be of the enumeration type. +Operators `|`, `^`, `&`, `~`, `++`, and `--` are defined only for enumerations with integral underlying types, not including `bool`. Both operands must be of the enumeration type. The compiler does no static or dynamic checking of the result of an enum operation; an operation may result in a value not in the range of the enum's valid enumerators. > [!NOTE] -> C++11 introduces enum class types in unmanaged code which are significantly different than managed enum classes in C++/CLI. In particular, the C++11 enum class type does not support the same operators as the managed enum class type in C++/CLI, and C++/CLI source code must provide an accessibility specifier in managed enum class declarations in order to distinguish them from unmanaged (C++11) enum class declarations. For more information about enum classes in C++/CLI, C++/CX, and C++11, see [enum class](../extensions/enum-class-cpp-component-extensions.md). +> C++11 introduces `enum class` types in unmanaged code which are significantly different than managed `enum class` types in C++/CLI. In particular, the C++11 `enum class` type does not support the same operators as the managed `enum class` type in C++/CLI, and C++/CLI source code must provide an accessibility specifier in managed enum class declarations in order to distinguish them from unmanaged (C++11) `enum class` declarations. For more information about `enum class` use in C++/CLI, C++/CX, and C++11, see [enum class](../extensions/enum-class-cpp-component-extensions.md). ```cpp // mcppv2_enum_5.cpp diff --git a/docs/dotnet/user-defined-operators-cpp-cli.md b/docs/dotnet/user-defined-operators-cpp-cli.md index ec068e65ec6..984a75eb85f 100644 --- a/docs/dotnet/user-defined-operators-cpp-cli.md +++ b/docs/dotnet/user-defined-operators-cpp-cli.md @@ -53,8 +53,8 @@ You can define the following operators: |^|Binary| |false|Unary| |true|Unary| -|||Binary| -||||Binary| +| `|` | Binary | +| `||` | Binary | |~|Unary| ## Example: User-defined operators diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c4746.md b/docs/error-messages/compiler-warnings/compiler-warning-c4746.md index 50e340f6bef..04491bb8f18 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c4746.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c4746.md @@ -8,9 +8,9 @@ ms.assetid: 5e79ab46-6031-499a-a986-716c866b6c0e --- # Compiler Warning C4746 -volatile access of '\' is subject to /volatile:[iso|ms] setting; consider using __iso_volatile_load/store intrinsic functions. +volatile access of '\' is subject to /volatile:[iso\|ms] setting; consider using __iso_volatile_load/store intrinsic functions. -C4746 is emitted whenever a volatile variable is accessed directly. It is intended to help developers identify code locations that are affected by the specific volatile model currently specified (which can be controlled with the [/volatile](../../build/reference/volatile-volatile-keyword-interpretation.md) compiler option). In particular, it can be useful in locating compiler-generated hardware memory barriers when /volatile:ms is used. +C4746 is emitted whenever a volatile variable is accessed directly. It's intended to help developers identify code locations that are affected by the specific volatile model currently specified (which can be controlled with the [`/volatile`](../../build/reference/volatile-volatile-keyword-interpretation.md) compiler option). In particular, it can be useful in locating compiler-generated hardware memory barriers when `/volatile:ms` is used. The __iso_volatile_load/store intrinsics can be used to explicitly access volatile memory without being affected by the volatile model. Using these intrinsics will not trigger C4746. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4158.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4158.md index 35fb1063548..0c5e3fe14ca 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4158.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4158.md @@ -10,4 +10,4 @@ ms.assetid: 6513c6b9-6772-4849-b96c-5bb093d54de6 > assuming #pragma pointers_to_members(full_generality, inheritance) -A **#pragma pointers_to_members(** *single* | *multiple* | *virtual* **)** was issued without an accompanying **#pragma pointers_to_members(full_generality)**. +A `#pragma pointers_to_members( single | multiple | virtual )` was issued without an accompanying `#pragma pointers_to_members(full_generality)`. diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md index 843d241ee33..4961aca1fd5 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md @@ -125,7 +125,7 @@ The articles in this section of the documentation explain a subset of the warnin |[Compiler warning (level 4) C4336](../../error-messages/compiler-warnings/compiler-warning-level-4-c4336.md)|import cross-referenced type library '*library1*' before importing '*library2*'| |[Compiler warning (level 4) C4337](../../error-messages/compiler-warnings/compiler-warning-level-4-c4337.md)|cross-referenced type library '*library1*' in '*library2*' is being automatically imported| |Compiler warning (level 4) C4338|#pragma *directive*: standard section '*section*' is used| -|[Compiler warning (level 4) C4339](../../error-messages/compiler-warnings/compiler-warning-level-4-c4339.md)|'*type*': use of undefined type detected in 'WinRT|CLR' meta-data - use of this type may lead to a runtime exception| +|[Compiler warning (level 4) C4339](../../error-messages/compiler-warnings/compiler-warning-level-4-c4339.md)|'*type*': use of undefined type detected in 'WinRT\|CLR' meta-data - use of this type may lead to a runtime exception| |[Compiler warning (level 1) C4340](../../error-messages/compiler-warnings/compiler-warning-level-1-c4340.md)|'*value*': value wrapped from positive to negative value| |[Compiler warning (level 1) C4342](../../error-messages/compiler-warnings/compiler-warning-level-1-c4342.md)|behavior change: '*function*' called, but a member operator was called in previous versions| |[Compiler warning (level 4) C4343](compiler-warning-level-4-c4343.md)|#pragma optimize("g",off) overrides /Og option| diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4400-through-c4599.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4400-through-c4599.md index 475af489f02..bc648f2588e 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4400-through-c4599.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4400-through-c4599.md @@ -25,7 +25,7 @@ The articles in this section of the documentation explain a subset of the warnin |[Compiler warning (level 1) C4405](../../error-messages/compiler-warnings/compiler-warning-level-1-c4405.md)|'*identifier*': identifier is reserved word| |[Compiler warning (level 1) C4406](../../error-messages/compiler-warnings/compiler-warning-level-1-c4406.md)|operand on directive ignored| |[Compiler warning (level 1) C4407](../../error-messages/compiler-warnings/compiler-warning-level-1-c4407.md)|cast between different pointer to member representations, compiler may generate incorrect code| -|[Compiler warning (level 4) C4408](../../error-messages/compiler-warnings/compiler-warning-level-4-c4408.md)|anonymous 'struct|union' did not declare any data members| +|[Compiler warning (level 4) C4408](../../error-messages/compiler-warnings/compiler-warning-level-4-c4408.md)|anonymous 'struct\|union' did not declare any data members| |[Compiler warning (level 1) C4409](../../error-messages/compiler-warnings/compiler-warning-level-1-c4409.md)|illegal instruction size| |[Compiler warning (level 1) C4410](../../error-messages/compiler-warnings/compiler-warning-level-1-c4410.md)|illegal size for operand| |[Compiler warning (level 1) C4411](../../error-messages/compiler-warnings/compiler-warning-level-1-c4411.md)|'*identifier*': symbol resolves to displacement register| @@ -58,7 +58,7 @@ The articles in this section of the documentation explain a subset of the warnin |Compiler warning (level 1) C4442|embedded null terminator in __annotation argument. Value will be truncated.| |Compiler warning (level 1) C4443|expected pragma parameter to be '0', '1', or '2'| |Compiler warning (level 3) C4444|'*identifier*': top level '__unaligned' is not implemented in this context| -|[Compiler warning (level 1) C4445](../../error-messages/compiler-warnings/compiler-warning-level-1-c4445.md)|'*function*': in a 'WinRT|managed' type a virtual method cannot be private| +|[Compiler warning (level 1) C4445](../../error-messages/compiler-warnings/compiler-warning-level-1-c4445.md)|'*function*': in a 'WinRT\|managed' type a virtual method cannot be private| |Compiler warning (level 1) C4446|'*type*': cannot map member '*name1*' into this type, due to conflict with the type name. The method was renamed to '*name2*'| |Compiler warning (level 1) C4447|'main' signature found without threading model. Consider using 'int main(Platform::Array\^ args)'.| |Compiler warning C4448|'*type*1' does not have a default interface specified in metadata. Picking: '*type2*', which may fail at runtime.| @@ -73,14 +73,14 @@ The articles in this section of the documentation explain a subset of the warnin |[Compiler warning (level 4) C4457](compiler-warning-level-4-c4457.md)|declaration of '*identifier*' hides function parameter| |[Compiler warning (level 4) C4458](compiler-warning-level-4-c4458.md)|declaration of '*identifier*' hides class member| |[Compiler warning (level 4) C4459](compiler-warning-level-4-c4459.md)|declaration of '*identifier*' hides global declaration| -|[Compiler warning (level 4) C4460](../../error-messages/compiler-warnings/compiler-warning-level-4-c4460.md)|'WinRT|managed' operator '*operator*', has parameter passed by reference. 'WinRT|managed' operator '*operator*' has different semantics from C++ operator '*cpp_operator*', did you intend to pass by value?| +|[Compiler warning (level 4) C4460](../../error-messages/compiler-warnings/compiler-warning-level-4-c4460.md)|'WinRT\|managed' operator '*operator*', has parameter passed by reference. 'WinRT\|managed' operator '*operator*' has different semantics from C++ operator '*cpp_operator*', did you intend to pass by value?| |[Compiler warning (level 1) C4461](../../error-messages/compiler-warnings/compiler-warning-level-1-c4461.md)|'*classname*': this class has a finalizer '!*finalizer*' but no destructor '~*dtor*'| |[Compiler warning (level 1, Error) C4462](../../error-messages/compiler-warnings/compiler-warning-level-1-c4462.md)|'*type*' : cannot determine the GUID of the type. Program may fail at runtime.| |[Compiler warning (level 4) C4463](compiler-warning-level-4-c4463.md)|overflow; assigning '*value*' to bit-field that can only hold values from '*min_value*' to '*max_value*'| |[Compiler warning (level 4) C4464](../../error-messages/compiler-warnings/compiler-warning-level-4-c4464.md)|relative include path contains '..'| |[Compiler warning (level 1) C4470](../../error-messages/compiler-warnings/compiler-warning-level-1-c4470.md)|floating-point control pragmas ignored under /clr| |[Compiler warning (level 4) C4471](compiler-warning-level-4-c4471.md)|'*enumeration*': a forward declaration of an unscoped enumeration must have an underlying type (int assumed)| -|Compiler warning (level 1) C4472|'*identifier*' is a native enum: add an access specifier (private/public) to declare a 'WinRT|managed' enum| +|Compiler warning (level 1) C4472|'*identifier*' is a native enum: add an access specifier (private/public) to declare a 'WinRT\|managed' enum| |[Compiler warning (level 1) C4473](c4473.md)|'*function*' : not enough arguments passed for format string| |Compiler warning (level 3) C4474|'*function*' : too many arguments passed for format string| |Compiler warning (level 3) C4475|'*function*' : length modifier '*modifier*' cannot be used with type field character '*character*' in format specifier| diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799.md index d08577ceb20..e121d8ff1aa 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799.md @@ -134,7 +134,7 @@ The articles in this section of the documentation explain a subset of the warnin |[Compiler warning (Level 1) C4742](../../error-messages/compiler-warnings/compiler-warning-level-1-c4742.md)|'var' has different alignment in 'file1' and 'file2': number and number| |[Compiler warning (Level 1) C4743](../../error-messages/compiler-warnings/compiler-warning-level-1-c4743.md)|'type' has different size in 'file1' and 'file2': number and number bytes| |[Compiler warning (Level 1) C4744](../../error-messages/compiler-warnings/compiler-warning-level-1-c4744.md)|'var' has different type in 'file1' and 'file2': 'type1' and 'type2'| -|[Compiler warning C4746](../../error-messages/compiler-warnings/compiler-warning-c4746.md)|volatile access of '*expression*' is subject to /volatile:\ setting; consider using __iso_volatile_load/store intrinsic functions| +|[Compiler warning C4746](../../error-messages/compiler-warnings/compiler-warning-c4746.md)|volatile access of '*expression*' is subject to /volatile:\ setting; consider using __iso_volatile_load/store intrinsic functions| |[Compiler warning (level 1) C4747](../../error-messages/compiler-warnings/compiler-warning-level-1-c4747.md)|Calling managed 'entrypoint': Managed code may not be run under loader lock, including the DLL entrypoint and calls reached from the DLL entrypoint| |Compiler warning (level 4) C4749|conditionally supported: offsetof applied to non-standard-layout type '*type*'| |[Compiler warning (level 1) C4750](compiler-warning-level-1-c4750.md)|'identifier': function with _alloca() inlined into a loop| diff --git a/docs/mfc/reference/cfileexception-class.md b/docs/mfc/reference/cfileexception-class.md index 631d93f31b9..5b9dda753a6 100644 --- a/docs/mfc/reference/cfileexception-class.md +++ b/docs/mfc/reference/cfileexception-class.md @@ -4,9 +4,8 @@ title: "CFileException Class" ms.date: "06/09/2020" f1_keywords: ["CFileException", "AFX/CFileException", "AFX/CFileException::CFileException", "AFX/CFileException::ErrnoToException", "AFX/CFileException::GetErrorMessage", "AFX/CFileException::OsErrorToException", "AFX/CFileException::ThrowErrno", "AFX/CFileException::ThrowOsError", "AFX/CFileException::m_cause", "AFX/CFileException::m_lOsError", "AFX/CFileException::m_strFileName"] helpviewer_keywords: ["CFileException [MFC], CFileException", "CFileException [MFC], ErrnoToException", "CFileException [MFC], GetErrorMessage", "CFileException [MFC], OsErrorToException", "CFileException [MFC], ThrowErrno", "CFileException [MFC], ThrowOsError", "CFileException [MFC], m_cause", "CFileException [MFC], m_lOsError", "CFileException [MFC], m_strFileName"] -ms.assetid: f6491bb9-bfbc-42fd-a952-b33f9b62323f --- -# CFileException Class +# `CFileException` Class Represents a file-related exception condition. @@ -22,45 +21,45 @@ class CFileException : public CException |Name|Description| |----------|-----------------| -|[CFileException::CFileException](#cfileexception)|Constructs a `CFileException` object.| +|[`CFileException::CFileException`](#cfileexception)|Constructs a `CFileException` object.| ### Public Methods |Name|Description| |----------|-----------------| -|[CFileException::ErrnoToException](#errnotoexception)|Returns cause code corresponding to a run-time error number.| -|[CFileException::GetErrorMessage](#geterrormessage)|Retrieves the message describing an exception.| -|[CFileException::OsErrorToException](#oserrortoexception)|Returns a cause code corresponding to an operating system error code.| -|[CFileException::ThrowErrno](#throwerrno)|Throws a file exception based on a runtime error number.| -|[CFileException::ThrowOsError](#throwoserror)|Throws a file exception based on an operating system error number.| +|[`CFileException::ErrnoToException`](#errnotoexception)|Returns cause code corresponding to a run-time error number.| +|[`CFileException::GetErrorMessage`](#geterrormessage)|Retrieves the message describing an exception.| +|[`CFileException::OsErrorToException`](#oserrortoexception)|Returns a cause code corresponding to an operating system error code.| +|[`CFileException::ThrowErrno`](#throwerrno)|Throws a file exception based on a runtime error number.| +|[`CFileException::ThrowOsError`](#throwoserror)|Throws a file exception based on an operating system error number.| ### Public Data Members |Name|Description| |----------|-----------------| -|[CFileException::m_cause](#m_cause)|Contains portable code corresponding to the exception cause.| -|[CFileException::m_lOsError](#m_loserror)|Contains the related operating-system error number.| -|[CFileException::m_strFileName](#m_strfilename)|Contains the name of the file for this exception.| +|[`CFileException::m_cause`](#m_cause)|Contains portable code corresponding to the exception cause.| +|[`CFileException::m_lOsError`](#m_loserror)|Contains the related operating-system error number.| +|[`CFileException::m_strFileName`](#m_strfilename)|Contains the name of the file for this exception.| ## Remarks The `CFileException` class includes public data members that hold the portable cause code and the operating-system-specific error number. The class also provides static member functions for throwing file exceptions and for returning cause codes for both operating-system errors and C run-time errors. -`CFileException` objects are constructed and thrown in `CFile` member functions and in member functions of derived classes. You can access these objects within the scope of a **CATCH** expression. For portability, use only the cause code to get the reason for an exception. For more information about exceptions, see the article [Exception Handling (MFC)](../../mfc/exception-handling-in-mfc.md). +`CFileException` objects are constructed and thrown in `CFile` member functions and in member functions of derived classes. You can access these objects within the scope of a **`CATCH`** expression. For portability, use only the cause code to get the reason for an exception. For more information about exceptions, see the article [Exception Handling (MFC)](../../mfc/exception-handling-in-mfc.md). ## Inheritance Hierarchy -[CObject](../../mfc/reference/cobject-class.md) +[`CObject`](../../mfc/reference/cobject-class.md) -[CException](../../mfc/reference/cexception-class.md) +[`CException`](../../mfc/reference/cexception-class.md) `CFileException` ## Requirements -**Header:** afx.h +**Header:** `afx.h` -## CFileException::CFileException +## `CFileException::CFileException` Constructs a `CFileException` object that stores the cause code and the operating-system code in the object. @@ -73,23 +72,23 @@ CFileException( ### Parameters -*cause*
-An enumerated type variable that indicates the reason for the exception. See [CFileException::m_cause](#m_cause) for a list of the possible values. +*`cause`*\ +An enumerated type variable that indicates the reason for the exception. See [`CFileException::m_cause`](#m_cause) for a list of the possible values. -*lOsError*
-An operating-system-specific reason for the exception, if available. The *lOsError* parameter provides more information than *cause* does. +*`lOsError`*\ +An operating-system-specific reason for the exception, if available. The *`lOsError`* parameter provides more information than *`cause`* does. -*lpszArchiveName*
+*`lpszArchiveName`*\ Points to a string containing the name of the `CFile` object causing the exception. ### Remarks -Do not use this constructor directly, but rather call the global function [AfxThrowFileException](exception-processing.md#afxthrowfileexception). +Don't use this constructor directly, but rather call the global function [`AfxThrowFileException`](exception-processing.md#afxthrowfileexception). > [!NOTE] -> The variable *lOsError* applies only to `CFile` and `CStdioFile` objects. The `CMemFile` class does not handle this error code. +> The variable *`lOsError`* applies only to `CFile` and `CStdioFile` objects. The `CMemFile` class does not handle this error code. -## CFileException::ErrnoToException +## `CFileException::ErrnoToException` Converts a given run-time library error value to a `CFileException` enumerated error value. @@ -99,8 +98,8 @@ static int PASCAL ErrnoToException(int nErrno); ### Parameters -*nErrno*
-An integer error code as defined in the run-time include file ERRNO.H. +*`nErrno`*\ +An integer error code as defined in the run-time include file `ERRNO.H`. ### Return Value @@ -108,13 +107,13 @@ Enumerated value that corresponds to a given run-time library error value. ### Remarks -See [CFileException::m_cause](#m_cause) for a list of the possible enumerated values. +See [`CFileException::m_cause`](#m_cause) for a list of the possible enumerated values. ### Example [!code-cpp[NVC_MFCFiles#26](../../atl-mfc-shared/reference/codesnippet/cpp/cfileexception-class_1.cpp)] -## CFileException::GetErrorMessage +## `CFileException::GetErrorMessage` Retrieves text that describes an exception. @@ -127,18 +126,18 @@ virtual BOOL GetErrorMessage( ### Parameters -*lpszError*
+*`lpszError`*\ [in, out] Pointer to a buffer that receives an error message. -*nMaxError*
-[in] The maximum number of characters the specified buffer can hold. This includes the terminating null character. +*`nMaxError`*\ +[in] The maximum number of characters the specified buffer can hold. This includes the terminating `NULL` character. -*pnHelpContext*
+*`pnHelpContext`*\ [in, out] Pointer to an unsigned integer that receives the help context ID. If `NULL`, no ID is returned. ### Return Value -TRUE if the method was successful; otherwise FALSE. +`TRUE` if the method was successful; otherwise `FALSE`. ### Remarks @@ -150,7 +149,7 @@ The following example uses `CFileException::GetErrorMessage`. [!code-cpp[NVC_MFCExceptions#22](../../mfc/codesnippet/cpp/cfileexception-class_2.cpp)] -## CFileException::m_cause +## `CFileException::m_cause` Contains values defined by a `CFileException` enumerated type. @@ -166,16 +165,16 @@ This data member is a public variable of type **`int`**. The enumerators and the |--|--| | `CFileException::none` | 0: No error occurred. | | `CFileException::genericException` | 1: An unspecified error occurred. | -| `CFileException::fileNotFound` | 2: The file could not be located. | +| `CFileException::fileNotFound` | 2: The file couldn't be located. | | `CFileException::badPath` | 3: All or part of the path is invalid. | | `CFileException::tooManyOpenFiles` | 4: The permitted number of open files was exceeded. | -| `CFileException::accessDenied` | 5: The file could not be accessed. | +| `CFileException::accessDenied` | 5: The file couldn't be accessed. | | `CFileException::invalidFile` | 6: There was an attempt to use an invalid file handle. | -| `CFileException::removeCurrentDir` | 7: The current working directory cannot be removed. | +| `CFileException::removeCurrentDir` | 7: The current working directory can’t be removed. | | `CFileException::directoryFull` | 8: There are no more directory entries. | | `CFileException::badSeek` | 9: There was an error trying to set the file pointer. | | `CFileException::hardIO` | 10: There was a hardware error. | -| `CFileException::sharingViolation` | 11: SHARE.EXE was not loaded, or a shared region was locked. | +| `CFileException::sharingViolation` | 11: `SHARE.EXE` wasn't loaded, or a shared region was locked. | | `CFileException::lockViolation` | 12: There was an attempt to lock a region that was already locked. | | `CFileException::diskFull` | 13: The disk is full. | | `CFileException::endOfFile` | 14: The end of file was reached. | @@ -184,13 +183,13 @@ This data member is a public variable of type **`int`**. The enumerators and the > These `CFileException` cause enumerators are distinct from the `CArchiveException` cause enumerators. > [!NOTE] -> `CArchiveException::generic` is deprecated. Use `genericException` instead. If **generic** is used in an application and built with /clr, the resulting syntax errors are not easy to decipher. +> `CArchiveException::generic` is deprecated. Use `genericException` instead. If **`generic`** is used in an application and built with `/clr`, the resulting syntax errors are not easy to decipher. ### Example [!code-cpp[NVC_MFCFiles#30](../../atl-mfc-shared/reference/codesnippet/cpp/cfileexception-class_3.cpp)] -## CFileException::m_lOsError +## `CFileException::m_lOsError` Contains the operating-system error code for this exception. @@ -200,9 +199,9 @@ LONG m_lOsError; ### Remarks -See your operating-system technical manual for a listing of error codes. This data member is a public variable of type LONG. +See your operating-system technical manual for a listing of error codes. This data member is a public variable of type `LONG`. -## CFileException::m_strFileName +## `CFileException::m_strFileName` Contains the name of the file for this exception condition. @@ -210,9 +209,9 @@ Contains the name of the file for this exception condition. CString m_strFileName; ``` -## CFileException::OsErrorToException +## `CFileException::OsErrorToException` -Returns an enumerator that corresponds to a given *lOsError* value. If the error code is unknown, then the function returns `CFileException::generic`. +Returns an enumerator that corresponds to a given *`lOsError`* value. If the error code is unknown, then the function returns `CFileException::generic`. ``` static int PASCAL OsErrorToException(LONG lOsError); @@ -220,7 +219,7 @@ static int PASCAL OsErrorToException(LONG lOsError); ### Parameters -*lOsError*
+*`lOsError`*\ An operating-system-specific error code. ### Return Value @@ -231,9 +230,9 @@ Enumerated value that corresponds to a given operating-system error value. [!code-cpp[NVC_MFCFiles#27](../../atl-mfc-shared/reference/codesnippet/cpp/cfileexception-class_4.cpp)] -## CFileException::ThrowErrno +## `CFileException::ThrowErrno` -Constructs a `CFileException` object corresponding to a given *nErrno* value, then throws the exception. +Constructs a `CFileException` object corresponding to a given *`nErrno`* value, then throws the exception. ``` static void PASCAL ThrowErrno(int nErrno, LPCTSTR lpszFileName = NULL); @@ -241,19 +240,19 @@ static void PASCAL ThrowErrno(int nErrno, LPCTSTR lpszFileName = NULL); ### Parameters -*nErrno*
-An integer error code as defined in the run-time include file ERRNO.H. +*`nErrno`*\ +An integer error code as defined in the run-time include file `ERRNO.H`. -*lpszFileName*
+*`lpszFileName`*\ A pointer to the string containing the name of the file that caused the exception, if available. ### Example [!code-cpp[NVC_MFCFiles#28](../../atl-mfc-shared/reference/codesnippet/cpp/cfileexception-class_5.cpp)] -## CFileException::ThrowOsError +## `CFileException::ThrowOsError` -Throws a `CFileException` corresponding to a given *lOsError* value. If the error code is unknown, then the function throws an exception coded as `CFileException::generic`. +Throws a `CFileException` corresponding to a given *`lOsError`* value. If the error code is unknown, then the function throws an exception coded as `CFileException::generic`. ``` static void PASCAL ThrowOsError(LONG lOsError, LPCTSTR lpszFileName = NULL); @@ -261,10 +260,10 @@ static void PASCAL ThrowOsError(LONG lOsError, LPCTSTR lpszFileName = NULL); ### Parameters -*lOsError*
+*`lOsError`*\ An operating-system-specific error code. -*lpszFileName*
+*`lpszFileName`*\ A pointer to the string containing the name of the file that caused the exception, if available. ### Example @@ -273,6 +272,6 @@ A pointer to the string containing the name of the file that caused the exceptio ## See also -[CException Class](../../mfc/reference/cexception-class.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
+[`CException` Class](../../mfc/reference/cexception-class.md)\ +[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ [Exception Processing](../../mfc/reference/exception-processing.md) diff --git a/docs/parallel/amp/graphics-cpp-amp.md b/docs/parallel/amp/graphics-cpp-amp.md index c0740ec8926..1361e754631 100644 --- a/docs/parallel/amp/graphics-cpp-amp.md +++ b/docs/parallel/amp/graphics-cpp-amp.md @@ -16,7 +16,7 @@ C++ AMP contains several APIs in the [Concurrency::graphics](../../parallel/amp/ ## The norm and unorm Types -The `norm` and `unorm` types are scalar types that limit the range of **`float`** values; this is known as *clamping*. These types can be explicitly constructed from other scalar types. In casting, the value is first cast to **`float`** and then clamped to the respective region that's allowed by norm [-1.0, 1.0] or unorm [0.0, 1.0]. Casting from +/- infinity returns +/-1. Casting from NaN is undefined. A norm can be implicitly constructed from a unorm and there is no loss of data. The implicit conversion operator to float is defined on these types. Binary operators are defined between these types and other built-in scalar types such as **`float`** and **`int`**: +, -, \*, /, ==, !=, >, \<, >=, <=. The compound assignment operators are also supported: +=, -=, \*=, /=. The unary negation operator (-) is defined for norm types. +The `norm` and `unorm` types are scalar types that limit the range of **`float`** values; this is known as *clamping*. These types can be explicitly constructed from other scalar types. In casting, the value is first cast to **`float`** and then clamped to the respective region that's allowed by `norm [-1.0, 1.0]` or `unorm [0.0, 1.0]`. Casting from +/- infinity returns +/-1. Casting from NaN is undefined. A `norm` can be implicitly constructed from a `unorm` and there is no loss of data. The implicit conversion operator to **`float`** is defined on these types. Binary operators are defined between these types and other built-in scalar types such as **`float`** and **`int`**: `+`, `-`, `*`, `/`, `==`, `!=`, `>`, `<`, `>=`, `<=`. The compound assignment operators are also supported: `+=`, `-=`, `*=`, `/=`. The unary negation operator (`-`) is defined for `norm` types. ## Short Vector Library @@ -35,20 +35,20 @@ The Short Vector Library provides some of the functionality of the [Vector Type] If an operator is defined between two short vectors, then it is also defined between a short vector and a scalar. Also, one of these must be true: -- The scalar’s type must be the same as the short vector’s element type. +- The scalar's type must be the same as the short vector's element type. -- The scalar’s type can be implicitly converted to the vector’s element type by using only one user-defined conversion. +- The scalar's type can be implicitly converted to the vector's element type by using only one user-defined conversion. The operation is carried component-wise between each component of the short vector and the scalar. Here are the valid operators: |Operator type|Valid types| |-------------------|-----------------| -|Binary operators|Valid on all types: +, -, \*, /,

Valid on integer types: %, ^, |, &, <\<, >>

The two vectors must have the same size, and the result is a vector of the same size.| -|Relational operators|Valid on all types: == and !=| -|Compound assignment operator|Valid on all types: +=, -=, \*=, /=

Valid on integer types: %=, ^=, |=, &=, <\<=, >>=| -|Increment and decrement operators|Valid on all types: ++, --

Both prefix and postfix are valid.| -|Bitwise NOT operator (~)|Valid on integer types.| -|Unary - operator|Valid on all types except `unorm` and `uint`.| +|Binary operators|Valid on all types: `+`, `-`, `*`, `/`,

Valid on integer types: `%`, `^`, `|`, `&`, `<<`, `>>`

The two vectors must have the same size, and the result is a vector of the same size.| +|Relational operators|Valid on all types: `==` and `!=`| +|Compound assignment operator|Valid on all types: `+=`, `-=`, `*=`, `/=`

Valid on integer types: `%=`, `^=`, `|=`, `&=`, `<<=`, `>>=`| +|Increment and decrement operators|Valid on all types: `++`, `--`

Both prefix and postfix are valid.| +|Bitwise NOT operator (`~`)|Valid on integer types.| +|Unary `-` operator|Valid on all types except `unorm` and `uint`.| ### Swizzling Expressions diff --git a/docs/parallel/amp/reference/int-2-class.md b/docs/parallel/amp/reference/int-2-class.md index 0c2ba409931..6b5e99b2225 100644 --- a/docs/parallel/amp/reference/int-2-class.md +++ b/docs/parallel/amp/reference/int-2-class.md @@ -57,7 +57,7 @@ class int_2; |int_2::operator*=|| |int_2::operator/=|| |int_2::operator^=|| -|int_2::operator|=|| +|int_2::operator\|=|| |int_2::operator~|| |int_2::operator++|| |int_2::operator+=|| diff --git a/docs/parallel/amp/reference/int-3-class.md b/docs/parallel/amp/reference/int-3-class.md index 8bc5602d4c5..460a6983ff9 100644 --- a/docs/parallel/amp/reference/int-3-class.md +++ b/docs/parallel/amp/reference/int-3-class.md @@ -81,7 +81,7 @@ class int_3; |int_3::operator*=|| |int_3::operator/=|| |int_3::operator^=|| -|int_3::operator|=|| +|int_3::operator\|=|| |int_3::operator~|| |int_3::operator++|| |int_3::operator+=|| diff --git a/docs/parallel/amp/reference/int-4-class.md b/docs/parallel/amp/reference/int-4-class.md index 05f5d25072c..ad9e159065f 100644 --- a/docs/parallel/amp/reference/int-4-class.md +++ b/docs/parallel/amp/reference/int-4-class.md @@ -181,7 +181,7 @@ class int_4; |int_4::operator*=|| |int_4::operator/=|| |int_4::operator^=|| -|int_4::operator|=|| +|int_4::operator\|=|| |int_4::operator~|| |int_4::operator++|| |int_4::operator+=|| diff --git a/docs/parallel/amp/reference/uint-2-class.md b/docs/parallel/amp/reference/uint-2-class.md index 68d194c3099..b94c30a56f3 100644 --- a/docs/parallel/amp/reference/uint-2-class.md +++ b/docs/parallel/amp/reference/uint-2-class.md @@ -56,7 +56,7 @@ class uint_2; |uint_2::operator*=|| |uint_2::operator/=|| |uint_2::operator^=|| -|uint_2::operator|=|| +|uint_2::operator\|=|| |uint_2::operator~|| |uint_2::operator++|| |uint_2::operator+=|| diff --git a/docs/parallel/amp/reference/uint-3-class.md b/docs/parallel/amp/reference/uint-3-class.md index 6f0e5836d6e..f6eba197139 100644 --- a/docs/parallel/amp/reference/uint-3-class.md +++ b/docs/parallel/amp/reference/uint-3-class.md @@ -80,7 +80,7 @@ class uint_3; |uint_3::operator*=|| |uint_3::operator/=|| |uint_3::operator^=|| -|uint_3::operator|=|| +|uint_3::operator\|=|| |uint_3::operator~|| |uint_3::operator++|| |uint_3::operator+=|| diff --git a/docs/parallel/concrt/reference/concurrency-namespace.md b/docs/parallel/concrt/reference/concurrency-namespace.md index 0a1a9c5e11a..a336049731c 100644 --- a/docs/parallel/concrt/reference/concurrency-namespace.md +++ b/docs/parallel/concrt/reference/concurrency-namespace.md @@ -203,7 +203,7 @@ namespace concurrency; |----------|-----------------| |[operator!=](concurrency-namespace-operators.md#operator_neq)|Tests if the `concurrent_vector` object on the left side of the operator is not equal to the `concurrent_vector` object on the right side.| |[operator&&](concurrency-namespace-operators.md#operator_amp_amp)|Overloaded. Creates a task that will complete successfully when both of the tasks supplied as arguments complete successfully.| -|[operator||](concurrency-namespace-operators.md#operator_lor)|Overloaded. Creates a task that will complete successfully when either of the tasks supplied as arguments completes successfully.| +|[`operator||`](concurrency-namespace-operators.md#operator_lor)|Overloaded. Creates a task that will complete successfully when either of the tasks supplied as arguments completes successfully.| |[operator<](concurrency-namespace-operators.md#operator_lt)|Tests if the `concurrent_vector` object on the left side of the operator is less than the `concurrent_vector` object on the right side.| |[operator<=](concurrency-namespace-operators.md#operator_lt_eq)|Tests if the `concurrent_vector` object on the left side of the operator is less than or equal to the `concurrent_vector` object on the right side.| |[operator==](concurrency-namespace-operators.md#operator_eq_eq)|Tests if the `concurrent_vector` object on the left side of the operator is equal to the `concurrent_vector` object on the right side.| diff --git a/docs/preprocessor/compiler-warnings-that-are-off-by-default.md b/docs/preprocessor/compiler-warnings-that-are-off-by-default.md index b38e8a2497d..7ca5655059e 100644 --- a/docs/preprocessor/compiler-warnings-that-are-off-by-default.md +++ b/docs/preprocessor/compiler-warnings-that-are-off-by-default.md @@ -101,7 +101,7 @@ The following warnings are turned off by default in Visual Studio 2015 and later | [C4692](../error-messages/compiler-warnings/compiler-warning-level-1-c4692.md) (level 1) | '*function*': signature of non-private member contains assembly private native type '*native_type*' | | [C4710](../error-messages/compiler-warnings/compiler-warning-level-4-c4710.md) (level 4) | '*function*': function not inlined | | [C4738](../error-messages/compiler-warnings/compiler-warning-level-3-c4738.md) (level 3) | storing 32-bit float result in memory, possible loss of performance | -| [C4746](../error-messages/compiler-warnings/compiler-warning-c4746.md) | volatile access of '*expression*' is subject to /volatile:\ setting; consider using __iso_volatile_load/store intrinsic functions | +| [C4746](../error-messages/compiler-warnings/compiler-warning-c4746.md) | volatile access of '*expression*' is subject to /volatile:\ setting; consider using __iso_volatile_load/store intrinsic functions | | C4749 (level 4) | conditionally supported: offsetof applied to non-standard-layout type '*type*' | | C4767 (level 4) | section name '*symbol*' is longer than 8 characters and will be truncated by the linker | | C4774 (level 4) | '*string*' : format string expected in argument *number* is not a string literal | diff --git a/docs/safeint/safeint-class.md b/docs/safeint/safeint-class.md index 288f91995ce..b9cd5d95024 100644 --- a/docs/safeint/safeint-class.md +++ b/docs/safeint/safeint-class.md @@ -152,11 +152,11 @@ The type of integer or Boolean parameter for the secondary operand. | ^= | `SafeInt& operator^= (SafeInt rhs) throw()` | | ^= | `template`

`SafeInt& operator^= (U rhs) throw()` | | ^= | `template`

`SafeInt& operator^= (SafeInt rhs) throw()` | -| | | `SafeInt operator| (SafeInt rhs) const throw()` | -| | | `template`

`SafeInt operator| (U rhs) const throw()` | -| |= | `SafeInt& operator|= (SafeInt rhs) throw()` | -| |= | `template`

`SafeInt& operator|= (U rhs) throw()` | -| |= | `template`

`SafeInt& operator|= (SafeInt rhs) throw()` | +| \| | `SafeInt operator| (SafeInt rhs) const throw()` | +| \| | `template`

`SafeInt operator| (U rhs) const throw()` | +| \|= | `SafeInt& operator|= (SafeInt rhs) throw()` | +| \|= | `template`

`SafeInt& operator|= (U rhs) throw()` | +| \|= | `template`

`SafeInt& operator|= (SafeInt rhs) throw()` | ## Remarks diff --git a/docs/standard-library/hash-map-class.md b/docs/standard-library/hash-map-class.md index 08190869e15..00d1c506db3 100644 --- a/docs/standard-library/hash-map-class.md +++ b/docs/standard-library/hash-map-class.md @@ -4,12 +4,11 @@ title: "hash_map Class" ms.date: "11/04/2016" f1_keywords: ["hash_map/stdext::hash_map", "hash_map/stdext::hash_map::allocator_type", "hash_map/stdext::hash_map::const_iterator", "hash_map/stdext::hash_map::const_pointer", "hash_map/stdext::hash_map::const_reference", "hash_map/stdext::hash_map::const_reverse_iterator", "hash_map/stdext::hash_map::difference_type", "hash_map/stdext::hash_map::iterator", "hash_map/stdext::hash_map::key_compare", "hash_map/stdext::hash_map::key_type", "hash_map/stdext::hash_map::mapped_type", "hash_map/stdext::hash_map::pointer", "hash_map/stdext::hash_map::reference", "hash_map/stdext::hash_map::reverse_iterator", "hash_map/stdext::hash_map::size_type", "hash_map/stdext::hash_map::value_type", "hash_map/stdext::hash_map::at", "hash_map/stdext::hash_map::begin", "hash_map/stdext::hash_map::cbegin", "hash_map/stdext::hash_map::cend", "hash_map/stdext::hash_map::clear", "hash_map/stdext::hash_map::count", "hash_map/stdext::hash_map::crbegin", "hash_map/stdext::hash_map::crend", "hash_map/stdext::hash_map::emplace", "hash_map/stdext::hash_map::emplace_hint", "hash_map/stdext::hash_map::empty", "hash_map/stdext::hash_map::end", "hash_map/stdext::hash_map::equal_range", "hash_map/stdext::hash_map::erase", "hash_map/stdext::hash_map::find", "hash_map/stdext::hash_map::get_allocator", "hash_map/stdext::hash_map::insert", "hash_map/stdext::hash_map::key_comp", "hash_map/stdext::hash_map::lower_bound", "hash_map/stdext::hash_map::max_size", "hash_map/stdext::hash_map::rbegin", "hash_map/stdext::hash_map::rend", "hash_map/stdext::hash_map::size", "hash_map/stdext::hash_map::swap", "hash_map/stdext::hash_map::upper_bound", "hash_map/stdext::hash_map::value_comp"] helpviewer_keywords: ["stdext::hash_map", "stdext::hash_map::allocator_type", "stdext::hash_map::const_iterator", "stdext::hash_map::const_pointer", "stdext::hash_map::const_reference", "stdext::hash_map::const_reverse_iterator", "stdext::hash_map::difference_type", "stdext::hash_map::iterator", "stdext::hash_map::key_compare", "stdext::hash_map::key_type", "stdext::hash_map::mapped_type", "stdext::hash_map::pointer", "stdext::hash_map::reference", "stdext::hash_map::reverse_iterator", "stdext::hash_map::size_type", "stdext::hash_map::value_type", "stdext::hash_map::at", "stdext::hash_map::begin", "stdext::hash_map::cbegin", "stdext::hash_map::cend", "stdext::hash_map::clear", "stdext::hash_map::count", "stdext::hash_map::crbegin", "stdext::hash_map::crend", "stdext::hash_map::emplace", "stdext::hash_map::emplace_hint", "stdext::hash_map::empty", "stdext::hash_map::end", "stdext::hash_map::equal_range", "stdext::hash_map::erase", "stdext::hash_map::find", "stdext::hash_map::get_allocator", "stdext::hash_map::insert", "stdext::hash_map::key_comp", "stdext::hash_map::lower_bound", "stdext::hash_map::max_size", "stdext::hash_map::rbegin", "stdext::hash_map::rend", "stdext::hash_map::size", "stdext::hash_map::swap", "stdext::hash_map::upper_bound", "stdext::hash_map::value_comp"] -ms.assetid: 40879dfc-51ba-4a59-9f9e-26208de568a8 --- -# hash_map Class +# `hash_map` Class > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). Stores and retrieves data quickly from a collection in which each element is a pair that has a sort key whose value is unique and an associated data value. @@ -25,21 +24,21 @@ class hash_map ### Parameters -*Key*\ -The key data type to be stored in the hash_map. +*`Key`*\ +The key data type to be stored in the `hash_map`. -*Type*\ -The element data type to be stored in the hash_map. +*`Type`*\ +The element data type to be stored in the `hash_map`. -*Traits*\ -The type which includes two function objects, one of class compare able to compare two element values as sort keys to determine their relative order and a hash function that is a unary predicate mapping key values of the elements to unsigned integers of type `size_t`. This argument is optional, and hash_compare<`Key`, less<`Key`> > is the default value. +*`Traits`*\ +The type that includes two function objects, one of class compare able to compare two element values as sort keys to determine their relative order and a hash function that is a unary predicate mapping key values of the elements to unsigned integers of type `size_t`. This argument is optional, and `hash_compare>` is the default value. -*Allocator*\ -The type that represents the stored allocator object that encapsulates details about the hash_map's allocation and deallocation of memory. This argument is optional, and the default value is allocator\>. +*`Allocator`*\ +The type that represents the stored allocator object that encapsulates details about the `hash_map`'s allocation and deallocation of memory. This argument is optional, and the default value is `allocator>`. ## Remarks -The hash_map is: +The `hash_map` is: - An associative container, which a variable size container that supports the efficient retrieval of element values based on an associated key value. @@ -53,94 +52,94 @@ The hash_map is: - A class template, because the functionality it provides is generic and so independent of the specific type of data contained as elements or keys. The data types to be used for elements and keys are, instead, specified as parameters in the class template along with the comparison function and allocator. -The main advantage of hashing over sorting is greater efficiency; a successful hashing performs insertions, deletions, and finds in constant average time as compared with a time proportional to the logarithm of the number of elements in the container for sorting techniques. The value of an element in a hash_map, but not its associated key value, may be changed directly. Instead, key values associated with old elements must be deleted and new key values associated with new elements inserted. +The main advantage of hashing over sorting is greater efficiency; a successful hashing performs insertions, deletions, and finds in constant average time as compared with a time proportional to the logarithm of the number of elements in the container for sorting techniques. The value of an element in a `hash_map`, but not its associated key value, may be changed directly. Instead, key values associated with old elements must be deleted and new key values associated with new elements inserted. The choice of container type should be based in general on the type of searching and inserting required by the application. Hashed associative containers are optimized for the operations of lookup, insertion and removal. The member functions that explicitly support these operations are efficient when used with a well-designed hash function, performing them in a time that is on average constant and not dependent on the number of elements in the container. A well-designed hash function produces a uniform distribution of hashed values and minimizes the number of collisions, where a collision is said to occur when distinct key values are mapped into the same hashed value. In the worst case, with the worst possible hash function, the number of operations is proportional to the number of elements in the sequence (linear time). -The hash_map should be the associative container of choice when the conditions associating the values with their keys are satisfied by the application. A model for this type of structure is an ordered list of uniquely occurring keywords with associated string values providing, say, definitions. If, instead, the words had more than one correct definition, so that keys were not unique, then a hash_multimap would be the container of choice. If, on the other hand, just the list of words were being stored, then a hash_set would be the correct container. If multiple occurrences of the words were allowed, then a hash_multiset would be the appropriate container structure. +The `hash_map` should be the associative container of choice when the conditions associating the values with their keys are satisfied by the application. A model for this type of structure is an ordered list of uniquely occurring keywords with associated string values providing, say, definitions. If, instead, the words had more than one correct definition, so that keys weren't unique, then a `hash_multimap` would be the container of choice. If, on the other hand, just the list of words were being stored, then a `hash_set` would be the correct container. If multiple occurrences of the words were allowed, then a `hash_multiset` would be the appropriate container structure. -The hash_map orders the sequence it controls by calling a stored hash *Traits* object of class [value_compare](../standard-library/value-compare-class.md). This stored object may be accessed by calling the member function [key_comp](#key_comp). Such a function object must behave the same as an object of class [hash_compare](../standard-library/hash-compare-class.md)>. Specifically, for all values *Key* of type *Key*, the call `Traits`( `Key` ) yields a distribution of values of type `size_t`. +The `hash_map` orders the sequence it controls by calling a stored hash *`Traits`* object of class [`value_compare`](../standard-library/value-compare-class.md). This stored object may be accessed by calling the member function [`key_comp`](#key_comp). Such a function object must behave the same as an object of class `hash_compare>`. Specifically, for all values *`Key`* of type *`Key`*, the call `Traits`( `Key` ) yields a distribution of values of type `size_t`. For more information, see [`hash_compare`](../standard-library/hash-compare-class.md). -In general, the elements need be merely less than comparable to establish this order: so that, given any two elements, it may 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 between the nonequivalent elements. On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense. A binary predicate f(x y) is a function object that has two argument objects `x` and `y` and a return value of **`true`** or **`false`**. An ordering imposed on a hash_map is a strict weak ordering if the binary predicate is irreflexive, antisymmetric, and transitive and if equivalence is transitive, where two objects x and y are defined to be equivalent when both f(x, y) and f(y, x) are false. If the stronger condition of equality between keys replaces that of equivalence, then the ordering becomes total (in the sense that all the elements are ordered with respect to each other) and the keys matched will be indiscernible from each other. +In general, the elements need be merely less than comparable to establish this order: so that, given any two elements, it may be determined either that they're equivalent (in the sense that neither is less than the other) or that one is less than the other. This results in an ordering between the nonequivalent elements. On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense. A binary predicate f(x y) is a function object that has two argument objects `x` and `y` and a return value of **`true`** or **`false`**. An ordering imposed on a `hash_map` is a strict weak ordering if the binary predicate is irreflexive, antisymmetric, and transitive and if equivalence is transitive, where two objects `x` and `y` are defined to be equivalent when both f(x, y) and f(y, x) are `false`. If the stronger condition of equality between keys replaces that of equivalence, then the ordering becomes total (in the sense that all the elements are ordered with respect to each other) and the keys matched will be indiscernible from each other. -The actual order of elements in the controlled sequence depends on the hash function, the ordering function, and the current size of the hash table stored in the container object. You cannot determine the current size of the hash table, so you cannot in general predict the order of elements in the controlled sequence. Inserting elements invalidates no iterators, and removing elements invalidates only those iterators that had specifically pointed at the removed elements. +The actual order of elements in the controlled sequence depends on the hash function, the ordering function, and the current size of the hash table stored in the container object. You can’t determine the current size of the hash table, so you can’t in general predict the order of elements in the controlled sequence. Inserting elements invalidates no iterators, and removing elements invalidates only those iterators that had specifically pointed at the removed elements. -The iterator provided by the hash_map class is a bidirectional iterator, but the class member functions [insert](#insert) and [hash_map](#hash_map) have versions that take as template parameters a weaker input iterator, whose functionality requirements are more minimal than those guaranteed by the class of bidirectional iterators. The different iterator concepts form a family related by refinements in their functionality. Each iterator concept has its own set of requirements, and the algorithms that work with them must limit their assumptions to the requirements provided by that type of iterator. It may be assumed that an input iterator may be dereferenced to refer to some object and that it may be incremented to the next iterator in the sequence. This is a minimal set of functionality, but it is enough to be able to talk meaningfully about a range of iterators `[First, Last)` in the context of the class member functions. +The iterator provided by the `hash_map` class is a bidirectional iterator, but the class member functions [`insert`](#insert) and [`hash_map`](#hash_map) have versions that take as template parameters a weaker input iterator, whose functionality requirements are more minimal than those guaranteed by the class of bidirectional iterators. The different iterator concepts form a family related by refinements in their functionality. Each iterator concept has its own set of requirements, and the algorithms that work with them must limit their assumptions to the requirements provided by that type of iterator. It may be assumed that an input iterator may be dereferenced to refer to some object and that it may be incremented to the next iterator in the sequence. This is a minimal set of functionality, but it's enough to be able to talk meaningfully about a range of iterators `[First, Last)` in the context of the class member functions. ### Constructors |Constructor|Description| |-|-| -|[hash_map](#hash_map)|Constructs a `hash_map` that is empty or that is a copy of all or part of some other `hash_map`.| +|[`hash_map`](#hash_map)|Constructs a `hash_map` that is empty or that is a copy of all or part of some other `hash_map`.| ### Typedefs |Type name|Description| |-|-| -|[allocator_type](#allocator_type)|A type that represents the `allocator` class for the `hash_map` object.| -|[const_iterator](#const_iterator)|A type that provides a bidirectional iterator that can read a **`const`** element in the `hash_map`.| -|[const_pointer](#const_pointer)|A type that provides a pointer to a **`const`** element in a `hash_map`.| -|[const_reference](#const_reference)|A type that provides a reference to a **`const`** element stored in a `hash_map` for reading and performing **`const`** operations.| -|[const_reverse_iterator](#const_reverse_iterator)|A type that provides a bidirectional iterator that can read any **`const`** element in the `hash_map`.| -|[difference_type](#difference_type)|A signed integer type that can be used to represent the number of elements of a `hash_map` in a range between elements pointed to by iterators.| -|[iterator](#iterator)|A type that provides a bidirectional iterator that can read or modify any element in a `hash_map`.| -|[key_compare](#key_compare)|A type that provides a function object that can compare two sort keys to determine the relative order of two elements in the `hash_map`.| -|[key_type](#key_type)|A type describes the sort key object that constitutes each element of the `hash_map`.| -|[mapped_type](#mapped_type)|A type that represents the data type stored in a `hash_map`.| -|[pointer](#pointer)|A type that provides a pointer to an element in a `hash_map`.| -|[reference](#reference)|A type that provides a reference to an element stored in a `hash_map`.| -|[reverse_iterator](#reverse_iterator)|A type that provides a bidirectional iterator that can read or modify an element in a reversed `hash_map`.| -|[size_type](#size_type)|An unsigned integer type that can represent the number of elements in a `hash_map`.| -|[value_type](#value_type)|A type that provides a function object that can compare two elements as sort keys to determine their relative order in the `hash_map`.| +|[`allocator_type`](#allocator_type)|A type that represents the `allocator` class for the `hash_map` object.| +|[`const_iterator`](#const_iterator)|A type that provides a bidirectional iterator that can read a **`const`** element in the `hash_map`.| +|[`const_pointer`](#const_pointer)|A type that provides a pointer to a **`const`** element in a `hash_map`.| +|[`const_reference`](#const_reference)|A type that provides a reference to a **`const`** element stored in a `hash_map` for reading and performing **`const`** operations.| +|[`const_reverse_iterator`](#const_reverse_iterator)|A type that provides a bidirectional iterator that can read any **`const`** element in the `hash_map`.| +|[`difference_type`](#difference_type)|A signed integer type that can be used to represent the number of elements of a `hash_map` in a range between elements pointed to by iterators.| +|[`iterator`](#iterator)|A type that provides a bidirectional iterator that can read or modify any element in a `hash_map`.| +|[`key_compare`](#key_compare)|A type that provides a function object that can compare two sort keys to determine the relative order of two elements in the `hash_map`.| +|[`key_type`](#key_type)|A type describes the sort key object that constitutes each element of the `hash_map`.| +|[`mapped_type`](#mapped_type)|A type that represents the data type stored in a `hash_map`.| +|[`pointer`](#pointer)|A type that provides a pointer to an element in a `hash_map`.| +|[`reference`](#reference)|A type that provides a reference to an element stored in a `hash_map`.| +|[`reverse_iterator`](#reverse_iterator)|A type that provides a bidirectional iterator that can read or modify an element in a reversed `hash_map`.| +|[`size_type`](#size_type)|An unsigned integer type that can represent the number of elements in a `hash_map`.| +|[`value_type`](#value_type)|A type that provides a function object that can compare two elements as sort keys to determine their relative order in the `hash_map`.| ### Member functions |Member function|Description| |-|-| -|[at](#at)|Finds an element in a `hash_map` with a specified key value.| -|[begin](#begin)|Returns an iterator addressing the first element in the `hash_map`.| -|[cbegin](#cbegin)|Returns a const iterator addressing the first element in the `hash_map`.| -|[cend](#cend)|Returns a const iterator that addresses the location succeeding the last element in a `hash_map`.| -|[clear](#clear)|Erases all the elements of a `hash_map`.| -|[count](#count)|Returns the number of elements in a `hash_map` whose key matches a parameter-specified key.| -|[crbegin](#crbegin)|Returns a const iterator addressing the first element in a reversed `hash_map`.| -|[crend](#crend)|Returns a const iterator that addresses the location succeeding the last element in a reversed `hash_map`.| -|[emplace](#emplace)|Inserts an element constructed in place into a `hash_map`.| -|[emplace_hint](#emplace_hint)|Inserts an element constructed in place into a `hash_map`, with a placement hint.| -|[empty](#empty)|Tests if a `hash_map` is empty.| -|[end](#end)|Returns an iterator that addresses the location succeeding the last element in a `hash_map`.| -|[equal_range](#equal_range)|Returns a pair of iterators, respectively, to the first element in a `hash_map` with a key that is greater than a specified key and to the first element in the `hash_map` with a key that is equal to or greater than the key.| -|[erase](#erase)|Removes an element or a range of elements in a `hash_map` from specified positions| -|[find](#find)|Returns an iterator addressing the location of an element in a `hash_map` that has a key equivalent to a specified key.| -|[get_allocator](#get_allocator)|Returns a copy of the `allocator` object used to construct the `hash_map`.| -|[insert](#insert)|Inserts an element or a range of elements into a `hash_map`.| -|[key_comp](#key_comp)|Returns an iterator to the first element in a `hash_map` with a key value that is equal to or greater than that of a specified key.| -|[lower_bound](#lower_bound)|Returns an iterator to the first element in a `hash_map` with a key value that is equal to or greater than that of a specified key.| -|[max_size](#max_size)|Returns the maximum length of the `hash_map`.| -|[rbegin](#rbegin)|Returns an iterator addressing the first element in a reversed `hash_map`.| -|[rend](#rend)|Returns an iterator that addresses the location succeeding the last element in a reversed `hash_map`.| -|[size](#size)|Returns the number of elements in the `hash_map`.| -|[swap](#swap)|Exchanges the elements of two `hash_map`s.| -|[upper_bound](#upper_bound)|Returns an iterator to the first element in a `hash_map` that with a key value that is greater than that of a specified key.| -|[value_comp](#value_comp)|Retrieves a copy of the comparison object used to order element values in a `hash_map`.| +|[`at`](#at)|Finds an element in a `hash_map` with a specified key value.| +|[`begin`](#begin)|Returns an iterator addressing the first element in the `hash_map`.| +|[`cbegin`](#cbegin)|Returns a const iterator addressing the first element in the `hash_map`.| +|[`cend`](#cend)|Returns a const iterator that addresses the location succeeding the last element in a `hash_map`.| +|[`clear`](#clear)|Erases all the elements of a `hash_map`.| +|[`count`](#count)|Returns the number of elements in a `hash_map` whose key matches a parameter-specified key.| +|[`crbegin`](#crbegin)|Returns a `const` iterator addressing the first element in a reversed `hash_map`.| +|[`crend`](#crend)|Returns a `const` iterator that addresses the location succeeding the last element in a reversed `hash_map`.| +|[`emplace`](#emplace)|Inserts an element constructed in place into a `hash_map`.| +|[`emplace_hint`](#emplace_hint)|Inserts an element constructed in place into a `hash_map`, with a placement hint.| +|[`empty`](#empty)|Tests if a `hash_map` is empty.| +|[`end`](#end)|Returns an iterator that addresses the location succeeding the last element in a `hash_map`.| +|[`equal_range`](#equal_range)|Returns a pair of iterators, respectively, to the first element in a `hash_map` with a key that is greater than a specified key and to the first element in the `hash_map` with a key that is equal to or greater than the key.| +|[`erase`](#erase)|Removes an element or a range of elements in a `hash_map` from specified positions| +|[`find`](#find)|Returns an iterator addressing the location of an element in a `hash_map` that has a key equivalent to a specified key.| +|[`get_allocator`](#get_allocator)|Returns a copy of the `allocator` object used to construct the `hash_map`.| +|[`insert`](#insert)|Inserts an element or a range of elements into a `hash_map`.| +|[`key_comp`](#key_comp)|Returns an iterator to the first element in a `hash_map` with a key value that is equal to or greater than that of a specified key.| +|[`lower_bound`](#lower_bound)|Returns an iterator to the first element in a `hash_map` with a key value that is equal to or greater than that of a specified key.| +|[`max_size`](#max_size)|Returns the maximum length of the `hash_map`.| +|[`rbegin`](#rbegin)|Returns an iterator addressing the first element in a reversed `hash_map`.| +|[`rend`](#rend)|Returns an iterator that addresses the location succeeding the last element in a reversed `hash_map`.| +|[`size`](#size)|Returns the number of elements in the `hash_map`.| +|[`swap`](#swap)|Exchanges the elements of two `hash_map`s.| +|[`upper_bound`](#upper_bound)|Returns an iterator to the first element in a `hash_map` that with a key value that is greater than that of a specified key.| +|[`value_comp`](#value_comp)|Retrieves a copy of the comparison object used to order element values in a `hash_map`.| ### Operators |Operator|Description| |-|-| |[`operator[]`](#op_at)|Inserts an element into a `hash_map` with a specified key value.| -|[hash_map::operator=](#op_eq)|Replaces the elements of a `hash_map` with a copy of another `hash_map`.| +|[`hash_map::operator=`](#op_eq)|Replaces the elements of a `hash_map` with a copy of another `hash_map`.| ## Requirements -**Header:** \ +**Header:** `` -**Namespace:** stdext +**Namespace:** `stdext` -## hash_map::allocator_type +## `hash_map::allocator_type` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). A type that represents the allocator class for the hash_map object. @@ -150,14 +149,14 @@ typedef list::allo ### Example -See example for [get_allocator](#get_allocator) for an example using `allocator_type`. +See example for [`get_allocator`](#get_allocator) for an example using `allocator_type`. -## hash_map::at +## `hash_map::at` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Finds an element in a hash_map with a specified key value. +Finds an element in a `hash_map` with a specified key value. ```cpp Type& at(const Key& key); @@ -167,7 +166,7 @@ const Type& at(const Key& key) const; ### Parameters -*key*\ +*`key`*\ The key value of the element that is to be found. ### Return Value @@ -176,7 +175,7 @@ A reference to the data value of the element found. ### Remarks -If the argument key value is not found, then the function throws an object of class [out_of_range Class](../standard-library/out-of-range-class.md). +If the argument key value isn't found, then the function throws an object of class [`out_of_range` Class](../standard-library/out-of-range-class.md). ### Example @@ -205,12 +204,12 @@ int main( ) } ``` -## hash_map::begin +## `hash_map::begin` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns an iterator addressing the first element in the hash_map. +Returns an iterator addressing the first element in the `hash_map`. ```cpp const_iterator begin() const; @@ -220,7 +219,7 @@ iterator begin(); ### Return Value -A bidirectional iterator addressing the first element in the hash_map or the location succeeding an empty hash_map. +A bidirectional iterator addressing the first element in the `hash_map` or the location succeeding an empty `hash_map`. ### Example @@ -266,12 +265,12 @@ The first element of hm1 is 0. The first element of hm1 is now 1. ``` -## hash_map::cbegin +## `hash_map::cbegin` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns a const iterator addressing the first element in the hash_map. +Returns a const iterator addressing the first element in the `hash_map`. ```cpp const_iterator cbegin() const; @@ -279,7 +278,7 @@ const_iterator cbegin() const; ### Return Value -A const bidirectional iterator addressing the first element in the [hash_map](../standard-library/hash-map-class.md) or the location succeeding an empty `hash_map`. +A const bidirectional iterator addressing the first element in the [`hash_map`](../standard-library/hash-map-class.md) or the location succeeding an empty `hash_map`. ### Example @@ -310,12 +309,12 @@ int main( ) The first element of hm1 is 2. ``` -## hash_map::cend +## `hash_map::cend` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns a const iterator that addresses the location succeeding the last element in a hash_map. +Returns a const iterator that addresses the location succeeding the last element in a `hash_map`. ```cpp const_iterator cend() const; @@ -323,13 +322,13 @@ const_iterator cend() const; ### Return Value -A const bidirectional iterator that addresses the location succeeding the last element in a [hash_map](../standard-library/hash-map-class.md). If the `hash_map` is empty, then `hash_map::cend == hash_map::begin`. +A const bidirectional iterator that addresses the location succeeding the last element in a [`hash_map`](../standard-library/hash-map-class.md). If the `hash_map` is empty, then `hash_map::cend == hash_map::begin`. ### Remarks `cend` is used to test whether an iterator has reached the end of its `hash_map`. -The value returned by `cend` should not be dereferenced. +The value returned by `cend` shouldn't be dereferenced. ### Example @@ -361,12 +360,12 @@ int main( ) The value of last element of hm1 is 30. ``` -## hash_map::clear +## `hash_map::clear` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Erases all the elements of a hash_map. +Erases all the elements of a `hash_map`. ```cpp void clear(); @@ -376,7 +375,7 @@ void clear(); ### Example -The following example demonstrates the use of the hash_map::clear member function. +The following example demonstrates the use of the `hash_map::clear` member function. ```cpp // hash_map_clear.cpp @@ -411,12 +410,12 @@ The size of the hash_map is initially 2. The size of the hash_map after clearing is 0. ``` -## hash_map::const_iterator +## `hash_map::const_iterator` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that provides a bidirectional iterator that can read a **`const`** element in the hash_map. +A type that provides a bidirectional iterator that can read a **`const`** element in the `hash_map`. ```cpp typedef list::const_iterator const_iterator; @@ -424,24 +423,24 @@ typedef list::cons ### Remarks -A type `const_iterator` cannot be used to modify the value of an element. +A type `const_iterator` can’t be used to modify the value of an element. -The `const_iterator` defined by hash_map points to elements that are objects of [value_type](#value_type), that is of type `pair< const Key, Type >`, whose first member is the key to the element and whose second member is the mapped datum held by the element. +The `const_iterator` defined by `hash_map` points to elements that are objects of [`value_type`](#value_type), that is of type `pair< const Key, Type >`, whose first member is the key to the element and whose second member is the mapped datum held by the element. -To dereference a `const_iterator` `cIter` pointing to an element in a hash_map, use the `->` operator. +To dereference a `const_iterator` `cIter` pointing to an element in a `hash_map`, use the `->` operator. To access the value of the key for the element, use `cIter->first`, which is equivalent to `(*cIter).first`. To access the value of the mapped datum for the element, use `cIter->second`, which is equivalent to `(*cIter).second`. ### Example -See example for [begin](#begin) for an example using `const_iterator`. +See example for [`begin`](#begin) for an example using `const_iterator`. -## hash_map::const_pointer +## `hash_map::const_pointer` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that provides a pointer to a **`const`** element in a hash_map. +A type that provides a pointer to a **`const`** element in a `hash_map`. ```cpp typedef list::const_pointer const_pointer; @@ -449,16 +448,16 @@ typedef list::co ### Remarks -A type `const_pointer` cannot be used to modify the value of an element. +A type `const_pointer` can’t be used to modify the value of an element. -In most cases, an [iterator](#iterator) should be used to access the elements in a hash_map object. +In most cases, an [`iterator`](#iterator) should be used to access the elements in a `hash_map` object. -## hash_map::const_reference +## `hash_map::const_reference` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that provides a reference to a **`const`** element stored in a hash_map for reading and performing **`const`** operations. +A type that provides a reference to a **`const`** element stored in a `hash_map` for reading and performing **`const`** operations. ```cpp typedef list::const_reference const_reference; @@ -509,12 +508,12 @@ The key of the first element in the hash_map is 1. The data value of the first element in the hash_map is 10. ``` -## hash_map::const_reverse_iterator +## `hash_map::const_reverse_iterator` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that provides a bidirectional iterator that can read any **`const`** element in the hash_map. +A type that provides a bidirectional iterator that can read any **`const`** element in the `hash_map`. ```cpp typedef list::const_reverse)iterator const_reverse_iterator; @@ -522,24 +521,25 @@ typedef list::cons ### Remarks -A type `const_reverse_iterator` cannot modify the value of an element and is use to iterate through the hash_map in reverse. +A type `const_reverse_iterator` can’t modify the value of an element and is used to iterate through the `hash_map` in reverse. -The `const_reverse_iterator` defined by hash_map points to elements that are objects of [value_type](#value_type), that is of type `pair`\< **const Key, Type**>, whose first member is the key to the element and whose second member is the mapped datum held by the element. +The `const_reverse_iterator` defined by `hash_map` points to elements that are objects of [`value_type`](#value_type), that is of type `pair< const Key, Type >`, whose first member is the key to the element and whose second member is the mapped datum held by the element. -To dereference a `const_reverse_iterator` `crIter` pointing to an element in a hash_map, use the **->** operator. +To dereference a `const_reverse_iterator` `crIter` pointing to an element in a `hash_map`, use the `->` operator. + +To access the value of the key for the element, use `crIter->first`, which is equivalent to `(*crIter).first`. To access the value of the mapped datum for the element, use `crIter->second`, which is equivalent to `(*crIter).first`. -To access the value of the key for the element, use `crIter` -> **first**, which is equivalent to (\* `crIter`) **.first**. To access the value of the mapped datum for the element, use `crIter` -> **second**, which is equivalent to (\* `crIter`). **first**. ### Example -See the example for [rend](#rend) for an example of how to declare and use the `const_reverse_iterator`. +See the example for [`rend`](#rend) for an example of how to declare and use the `const_reverse_iterator`. -## hash_map::count +## `hash_map::count` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns the number of elements in a hash_map whose key matches a parameter-specified key. +Returns the number of elements in a `hash_map` whose key matches a parameter-specified key. ```cpp size_type count(const Key& key) const; @@ -547,24 +547,24 @@ size_type count(const Key& key) const; ### Parameters -*key*\ -The key value of the elements to be matched from the hash_map. +*`key`*\ +The key value of the elements to be matched from the `hash_map`. ### Return Value -1 if the hash_map contains an element whose sort key matches the parameter key; 0 if the hash_map doesn't contain an element with a matching key. +1 if the `hash_map` contains an element whose sort key matches the parameter key; 0 if the `hash_map` doesn't contain an element with a matching key. ### Remarks -The member function returns the number of elements *x* in the range +The member function returns the number of elements *`x`* in the range -\[ lower_bound(*key*), upper_bound(*key*) ) +[`lower_bound(key)`](#lower_bound), [`upper_bound(key)`](#upper_bound) -which is 0 or 1 in the case of hash_map, which is a unique associative container. +which is 0 or 1 in the case of `hash_map`, which is a unique associative container. ### Example -The following example demonstrates the use of the hash_map::count member function. +The following example demonstrates the use of the `hash_map::count` member function. ```cpp // hash_map_count.cpp @@ -606,12 +606,12 @@ The number of elements in hm1 with a sort key of 2 is: 1. The number of elements in hm1 with a sort key of 3 is: 0. ``` -## hash_map::crbegin +## `hash_map::crbegin` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns a const iterator addressing the first element in a reversed hash_map. +Returns a `const` iterator addressing the first element in a reversed `hash_map`. ```cpp const_reverse_iterator crbegin() const; @@ -619,13 +619,13 @@ const_reverse_iterator crbegin() const; ### Return Value -A const reverse bidirectional iterator addressing the first element in a reversed [hash_map](../standard-library/hash-map-class.md) or addressing what had been the last element in the unreversed `hash_map`. +A `const` reverse bidirectional iterator addressing the first element in a reversed [`hash_map`](../standard-library/hash-map-class.md) or addressing what had been the last element in the unreversed `hash_map`. ### Remarks -`crbegin` is used with a reversed hash_map just as [begin](#begin) is used with a `hash_map`. +`crbegin` is used with a reversed `hash_map` just as [`begin`](#begin) is used with a `hash_map`. -With the return value of `crbegin`, the `hash_map` object cannot be modified. +With the return value of `crbegin`, the `hash_map` object can’t be modified. `crbegin` can be used to iterate through a `hash_map` backwards. @@ -658,12 +658,12 @@ int main( ) The first element of the reversed hash_map hm1 is 3. ``` -## hash_map::crend +## `hash_map::crend` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns a const iterator that addresses the location succeeding the last element in a reversed hash_map. +Returns a `const` iterator that addresses the location succeeding the last element in a reversed `hash_map`. ```cpp const_reverse_iterator crend() const; @@ -671,17 +671,17 @@ const_reverse_iterator crend() const; ### Return Value -A const reverse bidirectional iterator that addresses the location succeeding the last element in a reversed [hash_map](../standard-library/hash-map-class.md) (the location that had preceded the first element in the unreversed `hash_map`). +A `const` reverse bidirectional iterator that addresses the location succeeding the last element in a reversed [`hash_map`](../standard-library/hash-map-class.md) (the location that had preceded the first element in the unreversed `hash_map`). ### Remarks -`crend` is used with a reversed `hash_map` just as [hash_map::end](#end) is used with a `hash_map`. +`crend` is used with a reversed `hash_map` just as [`hash_map::end`](#end) is used with a `hash_map`. -With the return value of `crend`, the `hash_map` object cannot be modified. +With the return value of `crend`, the `hash_map` object can’t be modified. `crend` can be used to test to whether a reverse iterator has reached the end of its `hash_map`. -The value returned by `crend` should not be dereferenced. +The value returned by `crend` shouldn't be dereferenced. ### Example @@ -713,12 +713,12 @@ int main( ) The last element of the reversed hash_map hm1 is 3. ``` -## hash_map::difference_type +## `hash_map::difference_type` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A signed integer type that can be used to represent the number of elements of a hash_map in a range between elements pointed to by iterators. +A signed integer type that can be used to represent the number of elements of a `hash_map` in a range between elements pointed to by iterators. ```cpp typedef list::difference_type difference_type; @@ -783,12 +783,12 @@ The keys of the mapped elements are: 1 2 3. The values of the mapped elements are: 10 20 20. ``` -## hash_map::emplace +## `hash_map::emplace` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Inserts an element constructed in place into a hash_map. +Inserts an element constructed in place into a `hash_map`. ```cpp template @@ -799,18 +799,18 @@ emplace( ### Parameters -*val*\ -The value used to move construct an element to be inserted into the [hash_map](../standard-library/hash-map-class.md) unless the `hash_map` already contains that element (or, more generally, an element whose key is equivalently ordered). +*`val`*\ +The value used to move construct an element to be inserted into the [`hash_map`](../standard-library/hash-map-class.md) unless the `hash_map` already contains that element (or, more generally, an element whose key is equivalently ordered). ### Return Value -The `emplace` member function returns a pair whose bool component returns true if an insertion was made and false if the `hash_map` already contained an element whose key had an equivalent value in the ordering, and whose iterator component returns the address where a new element was inserted or where the element was already located. +The `emplace` member function returns a pair whose `bool` component returns `true` if an insertion was made and `false` if the `hash_map` already contained an element whose key had an equivalent value in the ordering, and whose `iterator` component returns the address where a new element was inserted or where the element was already located. -To access the iterator component of a pair `pr` returned by this member function, use `pr.first`, and to dereference it, use `*(pr.first)`. To access the **`bool`** component of a pair `pr` returned by this member function, use `pr.second`, and to dereference it, use `*(pr.second)`. +To access the `iterator` component of a pair `pr` returned by this member function, use `pr.first`, and to dereference it, use `*(pr.first)`. To access the **`bool`** component of a pair `pr` returned by this member function, use `pr.second`, and to dereference it, use `*(pr.second)`. ### Remarks -The [hash_map::value_type](#value_type) of an element is a pair, so that the value of an element will be an ordered pair with the first component equal to the key value and the second component equal to the data value of the element. +The [`hash_map::value_type`](#value_type) of an element is a pair, so that the value of an element will be an ordered pair with the first component equal to the key value and the second component equal to the data value of the element. ### Example @@ -841,12 +841,12 @@ After the emplace insertion, hm1 contains: 1 => a ``` -## hash_map::emplace_hint +## `hash_map::emplace_hint` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Inserts an element constructed in place into a hash_map, with a placement hint. +Inserts an element constructed in place into a `hash_map`, with a placement hint. ```cpp template @@ -857,21 +857,21 @@ iterator emplace_hint( ### Parameters -*val*\ -The value used to move construct an element to be inserted into the [hash_map](../standard-library/hash-map-class.md) unless the `hash_map` already contains that element (or, more generally, an element whose key is equivalently ordered). +*`val`*\ +The value used to move construct an element to be inserted into the [`hash_map`](../standard-library/hash-map-class.md) unless the `hash_map` already contains that element (or, more generally, an element whose key is equivalently ordered). -*_Where*\ +*`c`*\ A hint regarding the place to start searching for the correct point of insertion. ### Return Value -The [hash_multimap::emplace](../standard-library/hash-multimap-class.md#emplace) member function returns an iterator that points to the position where the new element was inserted into the `hash_map`, or where the existing element with equivalent ordering is located. +The [`hash_multimap::emplace`](../standard-library/hash-multimap-class.md#emplace) member function returns an iterator that points to the position where the new element was inserted into the `hash_map`, or where the existing element with equivalent ordering is located. ### Remarks -The [hash_map::value_type](#value_type) of an element is a pair, so that the value of an element will be an ordered pair with the first component equal to the key value and the second component equal to the data value of the element. +The [`hash_map::value_type`](#value_type) of an element is a pair, so that the value of an element will be an ordered pair with the first component equal to the key value and the second component equal to the data value of the element. -Insertion can occur in amortized constant time, instead of logarithmic time, if the insertion point immediately follows *_Where*. +Insertion can occur in amortized constant time, instead of logarithmic time, if the insertion point immediately follows *`_Where`*. ### Example @@ -902,12 +902,12 @@ After the emplace insertion, hm1 contains: 1 => a ``` -## hash_map::empty +## `hash_map::empty` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Tests if a hash_map is empty. +Tests if a `hash_map` is empty. ```cpp bool empty() const; @@ -915,7 +915,7 @@ bool empty() const; ### Return Value -**`true`** if the hash_map is empty; **`false`** if the hash_map is nonempty. +**`true`** if the `hash_map` is empty; **`false`** if the `hash_map` is nonempty. ### Remarks @@ -953,12 +953,12 @@ The hash_map hm1 is not empty. The hash_map hm2 is empty. ``` -## hash_map::end +## `hash_map::end` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns an iterator that addresses the location succeeding the last element in a hash_map. +Returns an iterator that addresses the location succeeding the last element in a `hash_map`. ```cpp const_iterator end() const; @@ -968,13 +968,13 @@ iterator end(); ### Return Value -A bidirectional iterator that addresses the location succeeding the last element in a hash_map. If the hash_map is empty, then hash_map::end == hash_map::begin. +A bidirectional iterator that addresses the location succeeding the last element in a `hash_map`. If the `hash_map` is empty, then `hash_map::end == hash_map::begin`. ### Remarks -`end` is used to test whether an iterator has reached the end of its hash_map. +`end` is used to test whether an iterator has reached the end of its `hash_map`. -The value returned by `end` should not be dereferenced. +The value returned by `end` shouldn't be dereferenced. ### Example @@ -1024,12 +1024,12 @@ The value of last element of hm1 is 30. The value of last element of hm1 is now 20. ``` -## hash_map::equal_range +## `hash_map::equal_range` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns a pair of iterators respectively to the first element in a hash_map with a key that is greater than a specified key and to the first element in the hash_map with a key that is equal to or greater than the key. +Returns a pair of iterators respectively to the first element in a `hash_map` with a key that is greater than a specified key and to the first element in the `hash_map` with a key that is equal to or greater than the key. ```cpp pair equal_range (const Key& key) const; @@ -1039,14 +1039,14 @@ pair equal_range (const Key& key); ### Parameters -*key*\ -The argument key value to be compared with the sort key of an element from the hash_map being searched. +*`key`*\ +The argument key value to be compared with the sort key of an element from the `hash_map` being searched. ### Return Value -A pair of iterators such that the first is the [lower_bound](#lower_bound) of the key and the second is the [upper_bound](#upper_bound) of the key. +A pair of iterators such that the first is the [`lower_bound`](#lower_bound) of the key and the second is the [`upper_bound`](#upper_bound) of the key. -To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first** and to dereference the lower bound iterator, use \*( `pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second** and to dereference the upper bound iterator, use \*( `pr`. **second**). +To access the first iterator of a pair `pr` returned by the member function, use `pr.first` and to dereference the lower bound iterator, use `*(pr.first)`. To access the second iterator of a pair `pr` returned by the member function, use `pr.second` and to dereference the upper bound iterator, use `*(pr.second)`. ### Remarks @@ -1111,12 +1111,12 @@ matching the 2nd element of the pair returned by equal_range( 2 ). The hash_map hm1 doesn't have an element with a key less than 40. ``` -## hash_map::erase +## `hash_map::erase` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Removes an element or a range of elements in a hash_map from specified positions or removes elements that match a specified key. +Removes an element or a range of elements in a `hash_map` from specified positions or removes elements that match a specified key. ```cpp iterator erase(iterator _Where); @@ -1128,23 +1128,23 @@ size_type erase(const key_type& key); ### Parameters -*_Where*\ -Position of the element to be removed from the hash_map. +*`_Where`*\ +Position of the element to be removed from the `hash_map`. -*first*\ -Position of the first element removed from the hash_map. +*`first`*\ +Position of the first element removed from the `hash_map`. -*last*\ -Position just beyond the last element removed from the hash_map. +*`last`*\ +Position just beyond the last element removed from the `hash_map`. -*key*\ -The key value of the elements to be removed from the hash_map. +*`key`*\ +The key value of the elements to be removed from the `hash_map`. ### Return Value -For the first two member functions, a bidirectional iterator that designates the first element remaining beyond any elements removed, or a pointer to the end of the hash_map if no such element exists. +For the first two member functions, a bidirectional iterator that designates the first element remaining beyond any elements removed, or a pointer to the end of the `hash_map` if no such element exists. -For the third member function, returns the number of elements that have been removed from the hash_map. +For the third member function, returns the number of elements that have been removed from the `hash_map`. ### Remarks @@ -1152,7 +1152,7 @@ The member functions never throw an exception. ### Example -The following example demonstrates the use of the hash_map::erase member function. +The following example demonstrates the use of the `hash_map::erase` member function. ```cpp // hash_map_erase.cpp @@ -1235,12 +1235,12 @@ After another element with a key equal to that of the 2nd element is deleted, the hash_map hm3 is: 0 3. ``` -## hash_map::find +## `hash_map::find` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns an iterator addressing the location of an element in a hash_map that has a key equivalent to a specified key. +Returns an iterator addressing the location of an element in a `hash_map` that has a key equivalent to a specified key. ```cpp iterator find(const Key& key); @@ -1250,18 +1250,18 @@ const_iterator find(const Key& key) const; ### Parameters -*key*\ -The key value to be matched by the sort key of an element from the hash_map being searched. +*`key`*\ +The key value to be matched by the sort key of an element from the `hash_map` being searched. ### Return Value -An iterator that addresses the location of an element with a specified key, or the location succeeding the last element in the hash_map if no match is found for the key. +An iterator that addresses the location of an element with a specified key, or the location succeeding the last element in the `hash_map` if no match is found for the key. ### Remarks -`find` returns an iterator that addresses an element in the hash_map whose sort key is equivalent to the argument key under a binary predicate that induces an ordering based on a less than comparability relation. +`find` returns an iterator that addresses an element in the `hash_map` whose sort key is equivalent to the argument key under a binary predicate that induces an ordering based on a less than comparability relation. -If the return value of `find` is assigned to a [const_iterator](#const_iterator), the hash_map object cannot be modified. If the return value of `find` is assigned to an [iterator](#iterator), the hash_map object can be modified +If the return value of `find` is assigned to a [`const_iterator`](#const_iterator), the `hash_map` object can’t be modified. If the return value of `find` is assigned to an [`iterator`](#iterator), the `hash_map` object can be modified ### Example @@ -1314,12 +1314,12 @@ The hash_map hm1 doesn't have an element with a key of 4. The element of hm1 with a key matching that of the last element is: 30. ``` -## hash_map::get_allocator +## `hash_map::get_allocator` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns a copy of the allocator object used to construct the hash_map. +Returns a copy of the allocator object used to construct the `hash_map`. ```cpp Allocator get_allocator() const; @@ -1327,11 +1327,11 @@ Allocator get_allocator() const; ### Return Value -The allocator used by the hash_map. +The allocator used by the `hash_map`. ### Remarks -Allocators for the hash_map class specify how the class manages storage. The default allocators supplied with C++ Standard Library container classes are sufficient for most programming needs. Writing and using your own allocator class is an advanced C++ topic. +Allocators for the `hash_map` class specify how the class manages storage. The default allocators supplied with C++ Standard Library container classes are sufficient for most programming needs. Writing and using your own allocator class is an advanced C++ topic. ### Example @@ -1390,12 +1390,12 @@ int main( ) } ``` -## hash_map::hash_map +## `hash_map::hash_map` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Constructs a hash_map that is empty or is a copy of all or part of some other hash_map. +Constructs a `hash_map` that is empty or is a copy of all or part of some other `hash_map`. ```cpp hash_map(); @@ -1443,46 +1443,46 @@ hash_map( ### Parameters -*Al*\ -The storage allocator class to be used for this hash_map object, which defaults to `Allocator`. +*`Al`*\ +The storage allocator class to be used for this `hash_map` object, which defaults to `Allocator`. -*Comp*\ -The comparison function of type const `Traits` used to order the elements in the hash_map, which defaults to `hash_compare`. +*`Comp`*\ +The comparison function of type const `Traits` used to order the elements in the `hash_map`, which defaults to `hash_compare`. -*Right*\ -The hash_map of which the constructed map is to be a copy. +*`Right`*\ +The `hash_map` of which the constructed map is to be a copy. -*First*\ +*`First`*\ The position of the first element in the range of elements to be copied. -*Last*\ +*`Last`*\ The position of the first element beyond the range of elements to be copied. -*IList*\ -The initializer_list +*`IList`*\ +The `initializer_list` ### Remarks -All constructors store a type of allocator object that manages memory storage for the hash_map and can later be returned by calling [get_allocator](#get_allocator). The allocator parameter is often omitted in the class declarations and preprocessing macros used to substitute alternative allocators. +All constructors store a type of allocator object that manages memory storage for the `hash_map` and can later be returned by calling [`get_allocator`](#get_allocator). The allocator parameter is often omitted in the class declarations and preprocessing macros used to substitute alternative allocators. -All constructors initialize their hash_map. +All constructors initialize their `hash_map`. -All constructors store a function object of type `Traits` that is used to establish an order among the keys of the hash_map and that can later be returned by calling [key_comp](#key_comp). +All constructors store a function object of type `Traits` that is used to establish an order among the keys of the `hash_map` and that can later be returned by calling [`key_comp`](#key_comp). -The first three constructors specify an empty initial hash_map, in addition, the second specifies the type of comparison function (*Comp*) to be used in establishing the order of the elements and the third explicitly specifies the allocator type (*Al*) to be used. The keyword **`explicit`** suppresses certain kinds of automatic type conversion. +The first three constructors specify an empty initial `hash_map`, in addition, the second specifies the type of comparison function (*`Comp`*) to be used in establishing the order of the elements and the third explicitly specifies the allocator type (*`Al`*) to be used. The keyword **`explicit`** suppresses certain kinds of automatic type conversion. -The fourth constructor specifies a copy of the hash_map *Right*. +The fourth constructor specifies a copy of the `hash_map` *`Right`*. -The next three constructors copy the range `[First, Last)` of a hash_map with increasing explicitness in specifying the type of comparison function of class `Traits` and allocator. +The next three constructors copy the range `[First, Last)` of a `hash_map` with increasing explicitness in specifying the type of comparison function of class `Traits` and allocator. -The last constructor moves the hash_map *Right*. +The last constructor moves the `hash_map` *`Right`*. -## hash_map::insert +## `hash_map::insert` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Inserts an element or a range of elements into a hash_map. +Inserts an element or a range of elements into a `hash_map`. ```cpp pair insert( @@ -1510,35 +1510,35 @@ iterator insert( ### Parameters -*val*\ -The value of an element to be inserted into the hash_map unless the hash_map already contains that element (or, more generally, an element whose key is equivalently ordered). +*`val`*\ +The value of an element to be inserted into the `hash_map` unless the `hash_map` already contains that element (or, more generally, an element whose key is equivalently ordered). -*_Where*\ +*`_Where`*\ A hint regarding the place to start searching for the correct point of insertion. -*first*\ -The position of the first element to be copied from a hash_map. +*`first`*\ +The position of the first element to be copied from a `hash_map`. -*last*\ -The position just beyond the last element to be copied from a hash_map. +*`last`*\ +The position just beyond the last element to be copied from a `hash_map`. ### Return Value -The first `insert` member function returns a pair whose bool component returns true if an insertion was made and false if the hash_map already contained an element whose key had an equivalent value in the ordering, and whose iterator component returns the address where a new element was inserted or where the element was already located. +The first `insert` member function returns a pair whose `bool` component returns `true` if an insertion was made and `false` if the `hash_map` already contained an element whose key had an equivalent value in the ordering, and whose iterator component returns the address where a new element was inserted or where the element was already located. -To access the iterator component of a pair `pr` returned by this member function, use `pr`. **first**, and to dereference it, use \*( `pr`. **first**). To access the **`bool`** component of a pair `pr` returned by this member function, use `pr`. **second**, and to dereference it, use \*( `pr`. **second**). +To access the iterator component of a pair `pr` returned by this member function, use `pr.first`, and to dereference it, use `(pr.first)`. To access the **`bool`** component of a pair `pr` returned by this member function, use `pr.second`, and to dereference it, use `\(pr.second)`. -The second `insert` member function, the hint version, returns an iterator that points to the position where the new element was inserted into the hash_map. +The second `insert` member function, the hint version, returns an iterator that points to the position where the new element was inserted into the `hash_map`. The last two `insert` member functions behave the same as the first two, except that they move construct the inserted value. ### Remarks -The [value_type](../standard-library/map-class.md#value_type) of an element is a pair, so that the value of an element will be an ordered pair with the first component equal to the key value and the second component equal to the data value of the element. +The [`value_type`](../standard-library/map-class.md#value_type) of an element is a pair, so that the value of an element will be an ordered pair with the first component equal to the key value and the second component equal to the data value of the element. -Insertion can occur in amortized constant time for the hint version of insert, instead of logarithmic time, if the insertion point immediately follows *_Where*. +Insertion can occur in amortized constant time for the hint version of insert, instead of logarithmic time, if the insertion point immediately follows *`_Where`*. -The third member function inserts the sequence of element values into a hash_map corresponding to each element addressed by an iterator of in the range *[First, Last)* of a specified set. +The third member function inserts the sequence of element values into a `hash_map` corresponding to each element addressed by an iterator of in the range `*[First, Last)*` of a specified set. ### Example @@ -1648,12 +1648,12 @@ After the move insertion, hm4 contains: 2 => b ``` -## hash_map::iterator +## `hash_map::iterator` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that provides a bidirectional iterator that can read or modify any element in a hash_map. +A type that provides a bidirectional iterator that can read or modify any element in a `hash_map`. ```cpp typedef list::iterator iterator; @@ -1661,7 +1661,7 @@ typedef list::iter ### Remarks -The `iterator` defined by hash_map points to elements that are objects of [value_type](#value_type), that is of type `pair`, whose first member is the key to the element and whose second member is the mapped datum held by the element. +The `iterator` defined by `hash_map` points to elements that are objects of [`value_type`](#value_type), that is of type `pair`, whose first member is the key to the element and whose second member is the mapped datum held by the element. To dereference an iterator named `Iter` pointing to an element in a multimap, use the `->` operator. @@ -1671,14 +1671,14 @@ A type `iterator` can be used to modify the value of an element. ### Example -See example for [begin](#begin) for an example of how to declare and use the `iterator`. +See example for [`begin`](#begin) for an example of how to declare and use the `iterator`. -## hash_map::key_comp +## `hash_map::key_comp` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Retrieves a copy of the comparison object used to order keys in a hash_map. +Retrieves a copy of the comparison object used to order keys in a `hash_map`. ```cpp key_compare key_comp() const; @@ -1686,7 +1686,7 @@ key_compare key_comp() const; ### Return Value -Returns the function object that a hash_map uses to order its elements. +Returns the function object that a `hash_map` uses to order its elements. ### Remarks @@ -1694,7 +1694,7 @@ The stored object defines the member function `bool operator( const Key& left, const Key&right );` -that returns **`true`** if `left` precedes and is not equal to `right` in the sort order. +that returns **`true`** if `left` precedes and isn't equal to `right` in the sort order. ### Example @@ -1749,10 +1749,10 @@ int main( ) } ``` -## hash_map::key_compare +## `hash_map::key_compare` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). A type that provides a function object that can compare two sort keys to determine the relative order of two elements in the map. @@ -1764,18 +1764,18 @@ typedef Traits key_compare; `key_compare` is a synonym for the template parameter `Traits`. -For more information on `Traits` see the [hash_map Class](../standard-library/hash-map-class.md) topic. +For more information on `Traits` see the [`hash_map` Class](../standard-library/hash-map-class.md) topic. ### Example -See example for [key_comp](#key_comp) for an example of how to declare and use `key_compare`. +See example for [`key_comp`](#key_comp) for an example of how to declare and use `key_compare`. -## hash_map::key_type +## `hash_map::key_type` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type describes the sort key object that constitutes each element of the hash_map. +A type describes the sort key object that constitutes each element of the `hash_map`. ```cpp typedef Key key_type; @@ -1785,18 +1785,18 @@ typedef Key key_type; `key_type` is a synonym for the template parameter `Key`. -For more information on `Key`, see the Remarks section of the [hash_map Class](../standard-library/hash-map-class.md) topic. +For more information on `Key`, see the Remarks section of the [`hash_map` Class](../standard-library/hash-map-class.md) topic. ### Example -See example for [value_type](#value_type) for an example of how to declare and use `key_type`. +See example for [`value_type`](#value_type) for an example of how to declare and use `key_type`. -## hash_map::lower_bound +## `hash_map::lower_bound` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns an iterator to the first element in a hash_map with a key value that is equal to or greater than that of a specified key. +Returns an iterator to the first element in a `hash_map` with a key value that is equal to or greater than that of a specified key. ```cpp iterator lower_bound(const Key& key); @@ -1806,14 +1806,14 @@ const_iterator lower_bound(const Key& key) const; ### Parameters -*key*\ -The argument key value to be compared with the sort key of an element from the hash_map being searched. +*`key`*\ +The argument key value to be compared with the sort key of an element from the `hash_map` being searched. ### Return Value -An [iterator](#iterator) or [const_iterator](#const_iterator) that addresses the location of an element in a hash_map that with a key that is equal to or greater than the argument key, or that addresses the location succeeding the last element in the hash_map if no match is found for the key. +An [`iterator`](#iterator) or [`const_iterator`](#const_iterator) that addresses the location of an element in a `hash_map` that with a key that is equal to or greater than the argument key, or that addresses the location succeeding the last element in the `hash_map` if no match is found for the key. -If the return value of `lower_bound` is assigned to a `const_iterator`, the hash_map object cannot be modified. If the return value of `lower_bound` is assigned to a `iterator`, the hash_map object can be modified. +If the return value of `lower_bound` is assigned to a `const_iterator`, the `hash_map` object can’t be modified. If the return value of `lower_bound` is assigned to a `iterator`, the `hash_map` object can be modified. ### Remarks @@ -1868,12 +1868,12 @@ The hash_map hm1 doesn't have an element with a key of 4. The element of hm1 with a key matching that of the last element is: 30. ``` -## hash_map::mapped_type +## `hash_map::mapped_type` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that represents the data type stored in a hash_map. +A type that represents the data type stored in a `hash_map`. ```cpp typedef Type mapped_type; @@ -1883,18 +1883,18 @@ typedef Type mapped_type; The type `mapped_type` is a synonym for the template parameter `Type`. -For more information on `Type` see the [hash_map Class](../standard-library/hash-map-class.md) topic. +For more information on `Type` see the [`hash_map` Class](../standard-library/hash-map-class.md) topic. ### Example -See example for [value_type](#value_type) for an example of how to declare and use `key_type`. +See example for [`value_type`](#value_type) for an example of how to declare and use `key_type`. -## hash_map::max_size +## `hash_map::max_size` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns the maximum length of the hash_map. +Returns the maximum length of the `hash_map`. ```cpp size_type max_size() const; @@ -1902,7 +1902,7 @@ size_type max_size() const; ### Return Value -The maximum possible length of the hash_map. +The maximum possible length of the `hash_map`. ### Remarks @@ -1928,10 +1928,10 @@ int main( ) } ``` -## hash_map::operator[] +## `hash_map::operator[]` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). Inserts an element into a `hash_map` with a specified key value. @@ -1943,7 +1943,7 @@ Type& operator[](Key&& key); ### Parameters -*key*\ +*`key`*\ The key value of the element that is to be inserted. ### Return Value @@ -1952,15 +1952,15 @@ A reference to the data value of the inserted element. ### Remarks -If the argument key value is not found, then it is inserted along with the default value of the data type. +If the argument key value isn't found, then it's inserted along with the default value of the data type. `operator[]` may be used to insert elements into a `hash_map m` using `m[ key] = DataValue`; -where DataValue is the value of the `mapped_type` of the element with a key value of *key*. +where DataValue is the value of the `mapped_type` of the element with a key value of *`key`*. -When using `operator[]` to insert elements, the returned reference does not indicate whether an insertion is changing a preexisting element or creating a new one. The member functions [find](../standard-library/map-class.md#find) and [insert](../standard-library/map-class.md#insert) can be used to determine whether an element with a specified key is already present before an insertion. +When using `operator[]` to insert elements, the returned reference doesn't indicate whether an insertion is changing a pre-existing element or creating a new one. The member functions [`find`](../standard-library/map-class.md#find) and [`insert`](../standard-library/map-class.md#insert) can be used to determine whether an element with a specified key is already present before an insertion. ### Example @@ -2024,12 +2024,12 @@ int main( ) } ``` -## hash_map::operator= +## `hash_map::operator=` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Replaces the elements of the hash_map with a copy of another hash_map. +Replaces the elements of the `hash_map` with a copy of another `hash_map`. ```cpp hash_map& operator=(const hash_map& right); @@ -2039,12 +2039,12 @@ hash_map& operator=(hash_map&& right); ### Parameters -*right*\ -The [hash_map Class](../standard-library/hash-map-class.md) being copied into the `hash_map`. +*`right`*\ +The [`right` Class](../standard-library/hash-map-class.md) being copied into the `hash_map`. ### Remarks -After erasing any existing elements in a `hash_map`, `operator=` either copies or moves the contents of *right* into the `hash_map`. +After erasing any existing elements in a `hash_map`, `operator=` either copies or moves the contents of *`right`* into the `hash_map`. ### Example @@ -2084,12 +2084,12 @@ int main( ) } ``` -## hash_map::pointer +## `hash_map::pointer` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that provides a pointer to an element in a hash_map. +A type that provides a pointer to an element in a `hash_map`. ```cpp typedef list::pointer pointer; @@ -2099,14 +2099,14 @@ typedef list::po A type `pointer` can be used to modify the value of an element. -In most cases, an [iterator](#iterator) should be used to access the elements in a hash_map object. +In most cases, an [`iterator`](#iterator) should be used to access the elements in a `hash_map` object. -## hash_map::rbegin +## `hash_map::rbegin` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns an iterator addressing the first element in a reversed hash_map. +Returns an iterator addressing the first element in a reversed `hash_map`. ```cpp const_reverse_iterator rbegin() const; @@ -2116,15 +2116,15 @@ reverse_iterator rbegin(); ### Return Value -A reverse bidirectional iterator addressing the first element in a reversed hash_map or addressing what had been the last element in the unreversed hash_map. +A reverse bidirectional iterator addressing the first element in a reversed `hash_map` or addressing what had been the last element in the unreversed `hash_map`. ### Remarks -`rbegin` is used with a reversed hash_map just as [begin](#begin) is used with a hash_map. +`rbegin` is used with a reversed `hash_map` just as [`begin`](#begin) is used with a `hash_map`. -If the return value of `rbegin` is assigned to a [const_reverse_iterator](#const_reverse_iterator), then the hash_map object cannot be modified. If the return value of `rbegin` is assigned to a [reverse_iterator](#reverse_iterator), then the hash_map object can be modified. +If the return value of `rbegin` is assigned to a [`const_reverse_iterator`](#const_reverse_iterator), then the `hash_map` object can’t be modified. If the return value of `rbegin` is assigned to a [`reverse_iterator`](#reverse_iterator), then the `hash_map` object can be modified. -`rbegin` can be used to iterate through a hash_map backwards. +`rbegin` can be used to iterate through a `hash_map` backwards. ### Example @@ -2185,12 +2185,12 @@ The reversed hash_map is: 3 2 1 . After the erasure, the first element in the reversed hash_map is 2. ``` -## hash_map::reference +## `hash_map::reference` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that provides a reference to an element stored in a hash_map. +A type that provides a reference to an element stored in a `hash_map`. ```cpp typedef list::reference reference; @@ -2248,12 +2248,12 @@ The data value of first element in the hash_map is 10. The modified data value of first element is 15. ``` -## hash_map::rend +## `hash_map::rend` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns an iterator that addresses the location succeeding the last element in a reversed hash_map. +Returns an iterator that addresses the location succeeding the last element in a reversed `hash_map`. ```cpp const_reverse_iterator rend() const; @@ -2263,17 +2263,17 @@ reverse_iterator rend(); ### Return Value -A reverse bidirectional iterator that addresses the location succeeding the last element in a reversed hash_map (the location that had preceded the first element in the unreversed hash_map). +A reverse bidirectional iterator that addresses the location succeeding the last element in a reversed `hash_map` (the location that had preceded the first element in the unreversed `hash_map`). ### Remarks -`rend` is used with a reversed hash_map just as [end](#end) is used with a hash_map. +`rend` is used with a reversed `hash_map` just as [`end`](#end) is used with a `hash_map`. -If the return value of `rend` is assigned to a [const_reverse_iterator](#const_reverse_iterator), then the hash_map object cannot be modified. If the return value of `rend` is assigned to a [reverse_iterator](#reverse_iterator), then the hash_map object can be modified. +If the return value of `rend` is assigned to a [`const_reverse_iterator`](#const_reverse_iterator), then the `hash_map` object can’t be modified. If the return value of `rend` is assigned to a [`reverse_iterator`](#reverse_iterator), then the `hash_map` object can be modified. -`rend` can be used to test to whether a reverse iterator has reached the end of its hash_map. +`rend` can be used to test to whether a reverse iterator has reached the end of its `hash_map`. -The value returned by `rend` should not be dereferenced. +The value returned by `rend` shouldn't be dereferenced. ### Example @@ -2338,12 +2338,12 @@ The reversed hash_map is: 3 2 1 . After the erasure, the last element in the reversed hash_map is 2. ``` -## hash_map::reverse_iterator +## `hash_map::reverse_iterator` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that provides a bidirectional iterator that can read or modify an element in a reversed hash_map. +A type that provides a bidirectional iterator that can read or modify an element in a reversed `hash_map`. ```cpp typedef list::reverse_iterator reverse_iterator; @@ -2351,24 +2351,24 @@ typedef list::reve ### Remarks -A type `reverse_iterator` cannot modify the value of an element and is use to iterate through the hash_map in reverse. +A type `reverse_iterator` can’t modify the value of an element and is used to iterate through the `hash_map` in reverse. -The `reverse_iterator` defined by hash_map points to elements that are objects of [value_type](#value_type), that is of type **pair\**, whose first member is the key to the element and whose second member is the mapped datum held by the element. +The `reverse_iterator` defined by `hash_map` points to elements that are objects of [value_type](#value_type), that is of type `pair`, whose first member is the key to the element and whose second member is the mapped datum held by the element. -To dereference a `reverse_iterator` `rIter` pointing to an element in a hash_map, use the -> operator. +To dereference a `reverse_iterator` `rIter` pointing to an element in a `hash_map`, use the `->` operator. -To access the value of the key for the element, use `rIter` -> **first**, which is equivalent to (\* `rIter`). **first**. To access the value of the mapped datum for the element, use `rIter` -> **second**, which is equivalent to (\* `rIter`). **first**. +To access the value of the key for the element, use `rIter->first`, which is equivalent to `(*rIter).first`. To access the value of the mapped datum for the element, use `rIter->second`, which is equivalent to `(*rIter).first`. ### Example -See example for [rbegin](#rbegin) for an example of how to declare and use `reverse_iterator`. +See example for [`rbegin`](#rbegin) for an example of how to declare and use `reverse_iterator`. -## hash_map::size +## `hash_map::size` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns the number of elements in the hash_map. +Returns the number of elements in the `hash_map`. ```cpp size_type size() const; @@ -2376,13 +2376,13 @@ size_type size() const; ### Return Value -The current length of the hash_map. +The current length of the `hash_map`. ### Remarks ### Example -The following example demonstrates the use of the hash_map::size member function. +The following example demonstrates the use of the `hash_map::size` member function. ```cpp // hash_map_size.cpp @@ -2413,12 +2413,12 @@ The hash_map length is 1. The hash_map length is now 2. ``` -## hash_map::size_type +## `hash_map::size_type` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -An unsigned integer type that can represent the number of elements in a hash_map. +An unsigned integer type that can represent the number of elements in a `hash_map`. ```cpp typedef list::size_type size_type; @@ -2428,14 +2428,14 @@ typedef list::si ### Example -See example for [size](#size) for an example of how to declare and use `size_type` +See example for [`size`](#size) for an example of how to declare and use `size_type` -## hash_map::swap +## `hash_map::swap` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Exchanges the elements of two hash_maps. +Exchanges the elements of two `hash_map`s. ```cpp void swap(hash_map& right); @@ -2443,12 +2443,12 @@ void swap(hash_map& right); ### Parameters -*right*\ -The argument hash_map providing the elements to be swapped with the target hash_map. +*`right`*\ +The argument `hash_map` providing the elements to be swapped with the target `hash_map`. ### Remarks -The member function invalidates no references, pointers, or iterators that designate elements in the two hash_maps whose elements are being exchanged. +The member function invalidates no references, pointers, or iterators that designate elements in the two `hash_map`s whose elements are being exchanged. ### Example @@ -2504,12 +2504,12 @@ After swapping with hm2, hash_map hm1 is: 100 200. After swapping with hm3, hash_map hm1 is: 300. ``` -## hash_map::upper_bound +## `hash_map::upper_bound` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns an iterator to the first element in a hash_map that with a key having a value that is greater than that of a specified key. +Returns an iterator to the first element in a `hash_map` that with a key having a value that is greater than that of a specified key. ```cpp iterator upper_bound(const Key& key); @@ -2519,14 +2519,14 @@ const_iterator upper_bound(const Key& key) const; ### Parameters -*key*\ -The argument key value to be compared with the sort key value of an element from the hash_map being searched. +*`key`*\ +The argument key value to be compared with the sort key value of an element from the `hash_map` being searched. ### Return Value -An [iterator](#iterator) or [const_iterator](#const_iterator) that addresses the location of an element in a hash_map that with a key that is greater than the argument key, or that addresses the location succeeding the last element in the hash_map if no match is found for the key. +An [`iterator`](#iterator) or [`const_iterator`](#const_iterator) that addresses the location of an element in a `hash_map` that with a key that is greater than the argument key, or that addresses the location succeeding the last element in the `hash_map` if no match is found for the key. -If the return value is assigned to a `const_iterator`, the hash_map object cannot be modified. If the return value is assigned to an `iterator`, the hash_map object can be modified. +If the return value is assigned to a `const_iterator`, the `hash_map` object can’t be modified. If the return value is assigned to an `iterator`, the `hash_map` object can be modified. ### Remarks @@ -2582,12 +2582,12 @@ The 1st element of hm1 with a key greater than that of the initial element of hm1 is: 20. ``` -## hash_map::value_comp +## `hash_map::value_comp` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -Returns a function object that determines the order of elements in a hash_map by comparing their key values. +Returns a function object that determines the order of elements in a `hash_map` by comparing their key values. ```cpp value_compare value_comp() const; @@ -2595,15 +2595,15 @@ value_compare value_comp() const; ### Return Value -Returns the comparison function object that a hash_map uses to order its elements. +Returns the comparison function object that a `hash_map` uses to order its elements. ### Remarks -For a hash_map *m*, if two elements *e1* (*k1*, *d1*) and *e2* (*k2*, *d2*) are objects of type [value_type](#value_type), where *k1* and *k2* are their keys of type [key_type](#key_type) and *d1* and *d2* are their data of type [mapped_type](#mapped_type), then `m.value_comp()(e1, e2)` is equivalent to `m.key_comp()(k1, k2)`. A stored object defines the member function +For a `hash_map` *`m`*, if two elements *`e1`* (*`k1`*, *`d1`*) and *`e2`* (*`k2`*, *`d2`*) are objects of type [`value_type`](#value_type), where *`k1`* and *`k2`* are their keys of type [`key_type`](#key_type) and *`d1`* and *`d2`* are their data of type [`mapped_type`](#mapped_type), then `m.value_comp()(e1, e2)` is equivalent to `m.key_comp()(k1, k2)`. A stored object defines the member function `bool operator(value_type& left, value_type& right);` -which returns **`true`** if the key value of `left` precedes and is not equal to the key value of `right` in the sort order. +which returns **`true`** if the key value of `left` precedes and isn't equal to the key value of `right` in the sort order. ### Example @@ -2650,12 +2650,12 @@ int main( ) } ``` -## hash_map::value_type +## `hash_map::value_type` > [!NOTE] -> This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). +> This API is obsolete. The alternative is [`unordered_map` Class](../standard-library/unordered-map-class.md). -A type that represents the type of object stored in a hash_map. +A type that represents the type of object stored in a `hash_map`. ```cpp typedef pair value_type; diff --git a/docs/windows/predefined-accelerator-keys.md b/docs/windows/predefined-accelerator-keys.md index f2594e86ada..53e8dab8023 100644 --- a/docs/windows/predefined-accelerator-keys.md +++ b/docs/windows/predefined-accelerator-keys.md @@ -47,7 +47,7 @@ There are a number of predefined accelerator keys that may be part of a Windows |VK_OEM_2|(Windows) For the US standard keyboard, the **/?** key| |VK_OEM_3|(Windows) For the US standard keyboard, the **`~** key| |VK_OEM_4|(Windows) For the US standard keyboard, the **[{** key| -|VK_OEM_5|(Windows) For the US standard keyboard, the **\\|** key| +|VK_OEM_5|(Windows) For the US standard keyboard, the **\\ \|** key| |VK_OEM_6|(Windows) For the US standard keyboard, the **]}** key| |VK_OEM_7|(Windows) For the US standard keyboard, the 'single-quote/double-quote' key| |VK_OEM_COMMA|(Windows) For any country/region, the **,** key|