Skip to content

Commit 673a97d

Browse files
author
Michael Blome
committed
merge conflict resolutions
2 parents 700799d + 85ef69c commit 673a97d

307 files changed

Lines changed: 3543 additions & 1344 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ When you create `BSTR`s and pass them between COM objects, you must take care in
6262

6363
## See Also
6464
[Strings (ATL/MFC)](../atl-mfc-shared/strings-atl-mfc.md)
65-
[CStringT::AllocSysString](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring)
65+
[CStringT::AllocSysString](../atl-mfc-shared/reference/cstringt-class.md#cstringt__allocsysstring)
6666
[SysAllocString](http://msdn.microsoft.com/en-us/9e0437a2-9b4a-4576-88b0-5cb9d08ca29b)
6767
[SysFreeString](http://msdn.microsoft.com/en-us/8f230ee3-5f6e-4cb9-a910-9c90b754dcd3)
6868

docs/atl-mfc-shared/basic-cstring-operations.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This topic explains the following basic [CString](../atl-mfc-shared/reference/cs
5050

5151
- [Converting CString objects](#_core_converting_cstring_objects)
5252

53-
`Class CString` is based on class template [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md). `CString` is a `typedef` of `CStringT`. More exactly, `CString` is a `typedef` of an *explicit specialization* of `CStringT`, which is a common way to use a class template to define a class. Similarly defined classes are `CStringA` and `CStringW`. For more information on explicit specialization, see [Class Template Instantiation](../topic/class%20template%20instantiation.md).
53+
`Class CString` is based on class template [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md). `CString` is a `typedef` of `CStringT`. More exactly, `CString` is a `typedef` of an *explicit specialization* of `CStringT`, which is a common way to use a class template to define a class. Similarly defined classes are `CStringA` and `CStringW`.
5454

5555
`CString`, `CStringA`, and `CStringW` are defined in atlstr.h. `CStringT` is defined in cstringt.h.
5656

@@ -117,8 +117,6 @@ CString cs("meow");
117117
## See Also
118118
[Strings (ATL/MFC)](../atl-mfc-shared/strings-atl-mfc.md)
119119
[CStringT Class](../atl-mfc-shared/reference/cstringt-class.md)
120-
[Class Template Instantiation](../topic/class%20template%20instantiation.md)
121-
[Explicit Specialization of Class Templates](../topic/explicit%20specialization%20of%20class%20templates.md)
122120
[Template Specialization](../cpp/template-specialization-cpp.md)
123121
[How to: Convert Between Various String Types](../text/how-to-convert-between-various-string-types.md)
124122

docs/atl-mfc-shared/cfixedstringt-example-of-a-custom-string-manager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The ATL library implements one example of a custom string manager used by class
7070
## Implementation of CFixedStringMgr::GetNilString
7171
The implementation of **CFixedStringMgr::GetNilString** returns the fixed buffer. Because of the one-on-one correspondence of **CFixedStringMgr** and `CStringT`, a given instance of `CStringT` never uses more than one buffer at a time. Therefore, a nil string and a real string buffer are never needed at the same time.
7272

73-
Whenever the fixed buffer is not in use, **CFixedStringMgr** ensures that it is initialized with a zero length. This allows it to be used as the nil string. As an added bonus, the `nAllocLength` member of the fixed buffer is always set to the full size of the fixed buffer. This means that `CStringT` can grow the string without calling [IAtlStringMgr::Reallocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#reallocate), even for the nil string.
73+
Whenever the fixed buffer is not in use, **CFixedStringMgr** ensures that it is initialized with a zero length. This allows it to be used as the nil string. As an added bonus, the `nAllocLength` member of the fixed buffer is always set to the full size of the fixed buffer. This means that `CStringT` can grow the string without calling [IAtlStringMgr::Reallocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#iatlstringmgr__reallocate), even for the nil string.
7474

7575
## Requirements
7676
**Header:** cstringt.h

docs/atl-mfc-shared/date-and-time-automation-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This article describes how to take advantage of the class library services relat
5555

5656
The `COleDateTime` and `COleDateTimeSpan` classes are designed to be used with the `COleVariant` class used in Automation. `COleDateTime` and `COleDateTimeSpan` are also useful in MFC database programming, but they can be used whenever you want to manipulate date and time values. Although the `COleDateTime` class has a greater range of values and finer granularity than the `CTime` class, it requires more storage per object than `CTime`. There are also some special considerations when working with the underlying **DATE** type. See [The DATE Type](../atl-mfc-shared/date-type.md) for more details on the implementation of **DATE**.
5757

58-
`COleDateTime` objects can be used to represent dates between January 1, 100, and December 31, 9999. `COleDateTime` objects are floating point values, with an approximate resolution of 1 millisecond. `COleDateTime` is based on the **DATE** data type, defined in the MFC documentation under [COleDateTime::operator DATE](../atl-mfc-shared/reference/coledatetime-class.md#operator%20date). The actual implementation of **DATE** extends beyond these bounds. The `COleDateTime` implementation imposes these bounds to facilitate working with the class.
58+
`COleDateTime` objects can be used to represent dates between January 1, 100, and December 31, 9999. `COleDateTime` objects are floating point values, with an approximate resolution of 1 millisecond. `COleDateTime` is based on the **DATE** data type, defined in the MFC documentation under [COleDateTime::operator DATE](../atl-mfc-shared/reference/coledatetime-class.md#coledatetime__operator%20date). The actual implementation of **DATE** extends beyond these bounds. The `COleDateTime` implementation imposes these bounds to facilitate working with the class.
5959

6060
`COleDateTime` does not support Julian dates. The Gregorian calendar is assumed to extend back in time to January 1, 100.
6161

docs/atl-mfc-shared/implementation-of-a-custom-string-manager-advanced-method.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ In specialized situations, you might want to implement a custom string manager t
3939

4040
The `CStringData` structure comprises four fields:
4141

42-
- [pStringMgr](../atl-mfc-shared/reference/cstringdata-class.md#pstringmgr) This field points to the `IAtlStringMgr` interface used to manage this string data. When `CStringT` needs to reallocate or free the string buffer it calls the Reallocate or Free methods of this interface, passing the `CStringData` structure as a parameter. When allocating a `CStringData` structure in your string manager, you must set this field to point to your custom string manager.
42+
- [pStringMgr](../atl-mfc-shared/reference/cstringdata-class.md#cstringdata__pstringmgr) This field points to the `IAtlStringMgr` interface used to manage this string data. When `CStringT` needs to reallocate or free the string buffer it calls the Reallocate or Free methods of this interface, passing the `CStringData` structure as a parameter. When allocating a `CStringData` structure in your string manager, you must set this field to point to your custom string manager.
4343

44-
- [nDataLength](../atl-mfc-shared/reference/cstringdata-class.md#ndatalength) This field contains the current logical length of the string stored in the buffer excluding the terminating null. `CStringT` updates this field when the length of the string changes. When allocating a `CStringData` structure, your string manager must set this field to zero. When reallocating a `CStringData` structure, your custom string manager must leave this field unchanged.
44+
- [nDataLength](../atl-mfc-shared/reference/cstringdata-class.md#cstringdata__ndatalength) This field contains the current logical length of the string stored in the buffer excluding the terminating null. `CStringT` updates this field when the length of the string changes. When allocating a `CStringData` structure, your string manager must set this field to zero. When reallocating a `CStringData` structure, your custom string manager must leave this field unchanged.
4545

46-
- [nAllocLength](../atl-mfc-shared/reference/cstringdata-class.md#nalloclength) This field contains the maximum number of characters (excluding the terminating null) that can be stored in this string buffer without reallocating it. Whenever `CStringT` needs to increase the logical length of the string, it first checks this field to make sure there is enough space in the buffer. If the check fails, `CStringT` calls into your custom string manager to reallocate the buffer. When allocating or reallocating a `CStringData` structure, you must set this field to at least the number of characters requested in the **nChars** parameter to [IAtlStringMgr::Allocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#allocate) or [IAtlStringMgr::Reallocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#reallocate). If there is more space in the buffer than requested, you can set this value to reflect the actual amount of space available. This allows `CStringT` to grow the string to fill the entire allocated space before it has to call back into the string manager to reallocate the buffer.
46+
- [nAllocLength](../atl-mfc-shared/reference/cstringdata-class.md#cstringdata__nalloclength) This field contains the maximum number of characters (excluding the terminating null) that can be stored in this string buffer without reallocating it. Whenever `CStringT` needs to increase the logical length of the string, it first checks this field to make sure there is enough space in the buffer. If the check fails, `CStringT` calls into your custom string manager to reallocate the buffer. When allocating or reallocating a `CStringData` structure, you must set this field to at least the number of characters requested in the **nChars** parameter to [IAtlStringMgr::Allocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#iatlstringmgr__allocate) or [IAtlStringMgr::Reallocate](../atl-mfc-shared/reference/iatlstringmgr-class.md#iatlstringmgr__reallocate). If there is more space in the buffer than requested, you can set this value to reflect the actual amount of space available. This allows `CStringT` to grow the string to fill the entire allocated space before it has to call back into the string manager to reallocate the buffer.
4747

48-
- [nRefs](../atl-mfc-shared/reference/cstringdata-class.md#nrefs) This field contains the current reference count of the string buffer. If the value is one, then a single instance of `CStringT` is using the buffer. In addition, the instance is allowed to both read and modify the contents of the buffer. If the value is greater than one, multiple instances of `CStringT` can use the buffer. Because the character buffer is shared, `CStringT` instances can only read the contents of the buffer. To modify the contents, `CStringT` first makes a copy of the buffer. If the value is negative, only one instance of `CStringT` is using the buffer. In this case, the buffer is considered locked. When a `CStringT` instance is using a locked buffer no other instances of `CStringT` may share the buffer. Instead, these instances create a copy of the buffer before manipulating the contents. In addition, the `CStringT` instance using the locked buffer does not attempt to share the buffer of any other `CStringT` instance assigned to it. In this case, the `CStringT` instance copies the other string into the locked buffer.
48+
- [nRefs](../atl-mfc-shared/reference/cstringdata-class.md#cstringdata__nrefs) This field contains the current reference count of the string buffer. If the value is one, then a single instance of `CStringT` is using the buffer. In addition, the instance is allowed to both read and modify the contents of the buffer. If the value is greater than one, multiple instances of `CStringT` can use the buffer. Because the character buffer is shared, `CStringT` instances can only read the contents of the buffer. To modify the contents, `CStringT` first makes a copy of the buffer. If the value is negative, only one instance of `CStringT` is using the buffer. In this case, the buffer is considered locked. When a `CStringT` instance is using a locked buffer no other instances of `CStringT` may share the buffer. Instead, these instances create a copy of the buffer before manipulating the contents. In addition, the `CStringT` instance using the locked buffer does not attempt to share the buffer of any other `CStringT` instance assigned to it. In this case, the `CStringT` instance copies the other string into the locked buffer.
4949

5050
When allocating a `CStringData` structure, you must set this field to reflect the type of sharing that is allowed for the buffer. For most implementations, set this value to one. This allows the usual copy-on-write sharing behavior. However, if your string manager does not support sharing the string buffer, set this field to a locked state. This forces `CStringT` to only use this buffer for the instance of `CStringT` that allocated it.
5151

docs/atl-mfc-shared/reference/cimage-class.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class CImage
144144
<!-- FIXME [!CODE [NVC_ATLMFC_Utilities#70](../codesnippet/vs_snippets_cpp/nvc_atlmfc_utilities#70)] -->
145145

146146
When you use `CImage` in an MFC project, note which member functions in your project expect a pointer to a [CBitmap](../../mfc/reference/cbitmap-class.md) object. If you want to use `CImage` with such a function, like [CMenu::AppendMenu](../../mfc/reference/cmenu-class.md#cmenu__appendmenu), use [CBitmap::FromHandle](../../mfc/reference/cbitmap-class.md#cbitmap__fromhandle), pass it your `CImage` `HBITMAP`, and use the returned `CBitmap*`.
147+
147148

148149
## Example
149150
<!-- FIXME [!CODE [NVC_ATLMFC_Utilities#71](../codesnippet/vs_snippets_cpp/nvc_atlmfc_utilities#71)]-->
@@ -161,7 +162,6 @@ class CImage
161162
|[TransparentBlt](#cimage__transparentblt)|Works with only Windows 2000, Windows 98, and later systems.|
162163
|[Draw](#cimage__draw)|Supports transparency with only Windows 2000, Windows 98, and later systems.|
163164

164-
165165
You can use `CImage` from either MFC or ATL.
166166

167167
> [!NOTE]
@@ -256,9 +256,7 @@ BOOL AlphaBlend(HDC hDestDC,
256256
Alpha-blend bitmaps support color blending on a per-pixel basis.
257257

258258
When `bBlendOp` is set to the default of **AC_SRC_OVER**, the source bitmap is placed over the destination bitmap based on the alpha values of the source pixels.
259-
260-
This method is applicable to Microsoft Windows 2000, Windows 98, and later systems. See [AlphaBlend](http://msdn.microsoft.com/library/windows/desktop/dd183351) in the [!INCLUDE[winSDK](./includes/winsdk_md.md)] for more detailed information.
261-
259+
262260
## <a name="cimage__attach"></a> CImage::Attach
263261
Attaches `hBitmap` to a `CImage` object.
264262

@@ -912,7 +910,7 @@ static BOOL IsTransparencySupported() throw();
912910

913911
If the application is compiled for use with operating systems before Windows 2000 or Windows 98, this method will always return 0, even on newer operating systems.
914912

915-
913+
916914
## <a name="cimage__load"></a> CImage::Load
917915
Loads an image.
918916

@@ -1048,8 +1046,6 @@ BOOL MaskBlt(HDC hDestDC,
10481046
### Remarks
10491047
This method applies to Windows NT, versions 4.0 and later only.
10501048

1051-
See `MaskBlt` in the [!INCLUDE[winsdkshort](./includes/winsdkshort_md.md)] for more detailed information.
1052-
10531049
## <a name="cimage__operator_hbitmap"></a> CImage::operator HBITMAP
10541050
Use this operator to get the attached Windows GDI handle of the `CImage` object. This operator is a casting operator, which supports direct use of an `HBITMAP` object.
10551051

@@ -1436,7 +1432,6 @@ BOOL TransparentBlt(HDC hDestDC,
14361432
### Remarks
14371433
`TransparentBlt` is supported for source bitmaps of 4 bits per pixel and 8 bits per pixel. Use [CImage::AlphaBlend](#cimage__alphablend) to specify 32 bits-per-pixel bitmaps with transparency.
14381434

1439-
This method is applicable to Microsoft Windows 2000, Windows 98, and later systems. See [TransparentBlt](http://msdn.microsoft.com/library/windows/desktop/dd145141) in the [!INCLUDE[winSDK](./includes/winsdk_md.md)] for more detailed information.
14401435

14411436
### Example
14421437
<!-- FIXME [!CODE [NVC_ATLMFC_Utilities#199](../codesnippet/vs_snippets_cpp/nvc_atlmfc_utilities#199)] -->
@@ -1447,6 +1442,9 @@ BOOL TransparentBlt(HDC hDestDC,
14471442
[Device-Independent Bitmaps](http://msdn.microsoft.com/library/windows/desktop/dd183562)
14481443
[CreateDIBSection](http://msdn.microsoft.com/library/windows/desktop/dd183494)
14491444
[ATL COM Desktop Components](../../atl/atl-com-desktop-components.md)
1445+
[Device-Independent Bitmaps](http://msdn.microsoft.com/library/windows/desktop/dd183562)
1446+
[CreateDIBSection](http://msdn.microsoft.com/library/windows/desktop/dd183494)
1447+
14501448

14511449

14521450

docs/atl-mfc-shared/reference/crect-class.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,14 @@ class CRect : public tagRECT
112112

113113
When specifying a `CRect`, you must be careful to construct it so that it is normalized — in other words, such that the value of the left coordinate is less than the right and the top is less than the bottom. For example, a top left of (10,10) and bottom right of (20,20) defines a normalized rectangle but a top left of (20,20) and bottom right of (10,10) defines a non-normalized rectangle. If the rectangle is not normalized, many `CRect` member functions may return incorrect results. (See [CRect::NormalizeRect](#crect__normalizerect) for a list of these functions.) Before you call a function that requires normalized rectangles, you can normalize non-normalized rectangles by calling the `NormalizeRect` function.
114114

115+
<<<<<<< HEAD
115116
Use caution when manipulating a `CRect` with the [CDC::DPtoLP](../../mfc/reference/cdc-class.md#cdc__dptolp) and [CDC::LPtoDP](../../mfc/reference/cdc-class.md#cdc__lptodp) member functions. If the mapping mode of a display context is such that the y-extent is negative, as in `MM_LOENGLISH`, then `CDC::DPtoLP` will transform the `CRect` so that its top is greater than the bottom. Functions such as **Height** and **Size** will then return negative values for the height of the transformed `CRect`, and the rectangle will be non-normalized.
117+
=======
118+
Use caution when manipulating a `CRect` with the [CDC::DPtoLP](../../mfc/reference/cdc-class.md#cdc__dptolp and [CDC::LPtoDP](../../mfc/reference/cdc-class.md#cdc__lptodp member functions. If the mapping mode of a display context is such that the y-extent is negative, as in `MM_LOENGLISH`, then `CDC::DPtoLP` will transform the `CRect` so that its top is greater than the bottom. Functions such as **Height** and **Size** will then return negative values for the height of the transformed `CRect`, and the rectangle will be non-normalized.
119+
>>>>>>> master
116120
117121
When using overloaded `CRect` operators, the first operand must be a `CRect`; the second can be either a [RECT](../../mfc/reference/rect-structure1.md) structure or a `CRect` object.
118122

119-
> [!NOTE]
120-
> For more information on shared utility classes (like `CRect`), see [Shared Classes](../topic/atl-mfc%20shared%20classes.md).
121-
122123
## Inheritance Hierarchy
123124
`tagRECT`
124125

@@ -614,7 +615,8 @@ void OffsetRect(
614615
<!-- FIXME [!CODE [NVC_ATLMFC_Utilities#50](../codesnippet/vs_snippets_cpp/nvc_atlmfc_utilities#50)] -->
615616

616617
## <a name="crect__operator_lpcrect"></a> CRect::operator LPCRECT
617-
Converts a `CRect` to an [LPCRECT](../topic/data%20types%20\(mfc\).md).
618+
Converts a `CRect` to an [LPCRECT](../../mfc/reference/data-types-mfc.md).
619+
618620

619621
``` operator LPCRECT() const throw();
620622
```
@@ -626,7 +628,11 @@ void OffsetRect(
626628
[!CODE [NVC_ATLMFC_Utilities#58](../codesnippet/vs_snippets_cpp/nvc_atlmfc_utilities#58)]
627629

628630
## <a name="crect__operator_lprect"></a> CRect::operator LPRECT
629-
Converts a `CRect` to an [LPRECT](../topic/data%20types%20\(mfc\).md).
631+
<<<<<<< HEAD
632+
Converts a `CRect` to an [LPRECT](../../mfc/reference/data-types-mfc.md).
633+
=======
634+
Converts a `CRect` to an `LPRECT`.
635+
>>>>>>> master
630636
631637
``` operator LPRECT() throw();
632638
```
@@ -1180,8 +1186,8 @@ int Width() const throw();
11801186
<!-- FIXME [!CODE [NVC_ATLMFC_Utilities#57](../codesnippet/vs_snippets_cpp/nvc_atlmfc_utilities#57)] -->
11811187

11821188
## See Also
1183-
11841189
[CPoint Class](cpoint-class.md)
11851190
[CSize Class](csize-class.md)
1186-
[RECT](../../mfc/reference)
1191+
[RECT](../../mfc/reference/rect-structure1.md)
1192+
11871193

0 commit comments

Comments
 (0)