Skip to content

Commit 9e2d6f6

Browse files
author
mtx48109
committed
format atl reference pr3
1 parent 6b77f3d commit 9e2d6f6

30 files changed

+689
-690
lines changed

docs/atl/reference/ccomclassfactorysingleton-class.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CComClassFactorySingleton : public CComClassFactory
2525
```
2626

2727
#### Parameters
28-
`T`
28+
*T*
2929
Your class.
3030

3131
`CComClassFactorySingleton` derives from [CComClassFactory](../../atl/reference/ccomclassfactory-class.md) and uses [CComObjectGlobal](../../atl/reference/ccomobjectglobal-class.md) to construct a single object. Each call to the `CreateInstance` method simply queries this object for an interface pointer.
@@ -71,17 +71,17 @@ STDMETHOD(CreateInstance)(LPUNKNOWN pUnkOuter, REFIID riid, void** ppvObj);
7171
```
7272

7373
### Parameters
74-
`pUnkOuter`
75-
[in] If the object is being created as part of an aggregate, then `pUnkOuter` must be the outer unknown. Otherwise, `pUnkOuter` must be **NULL**.
74+
*pUnkOuter*
75+
[in] If the object is being created as part of an aggregate, then *pUnkOuter* must be the outer unknown. Otherwise, *pUnkOuter* must be NULL.
7676

77-
`riid`
78-
[in] The IID of the requested interface. If `pUnkOuter` is non- **NULL**, `riid` must be **IID_IUnknown**.
77+
*riid*
78+
[in] The IID of the requested interface. If *pUnkOuter* is non- NULL, *riid* must be `IID_IUnknown`.
7979

80-
`ppvObj`
81-
[out] A pointer to the interface pointer identified by `riid`. If the object does not support this interface, `ppvObj` is set to **NULL**.
80+
*ppvObj*
81+
[out] A pointer to the interface pointer identified by *riid*. If the object does not support this interface, *ppvObj* is set to NULL.
8282

8383
### Return Value
84-
A standard `HRESULT` value.
84+
A standard HRESULT value.
8585

8686
## <a name="m_spobj"></a> CComClassFactorySingleton::m_spObj
8787
The [CComObjectGlobal](../../atl/reference/ccomobjectglobal-class.md) object constructed by `CComClassFactorySingleton`.

docs/atl/reference/ccomcoclass-class.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CComCoClass
2323
```
2424

2525
#### Parameters
26-
`T`
26+
*T*
2727
Your class, derived from `CComCoClass`.
2828

2929
*pclsid*
@@ -68,17 +68,17 @@ static HRESULT CreateInstance(IUnknown* punkOuter, Q** pp);
6868
```
6969

7070
### Parameters
71-
`Q`
72-
The COM interface that should be returned via `pp`.
71+
*Q*
72+
The COM interface that should be returned via *pp*.
7373

7474
*punkOuter*
7575
[in] The outer unknown or controlling unknown of the aggregate.
7676

77-
`pp`
77+
*pp*
7878
[out] The address of a pointer variable that receives the requested interface pointer if creation succeeds.
7979

8080
### Return Value
81-
A standard `HRESULT` value. See [CoCreateInstance](http://msdn.microsoft.com/library/windows/desktop/ms686615) in the Windows SDK for a description of possible return values.
81+
A standard HRESULT value. See [CoCreateInstance](http://msdn.microsoft.com/library/windows/desktop/ms686615) in the Windows SDK for a description of possible return values.
8282

8383
### Remarks
8484
Use the first overload of this function for typical object creation; use the second overload when you need to aggregate the object being created.
@@ -87,10 +87,10 @@ static HRESULT CreateInstance(IUnknown* punkOuter, Q** pp);
8787

8888
These functions are useful for creating objects that you have prevented from being externally creatable by using the [OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO](object-map-macros.md#object_entry_non_createable_ex_auto) macro. They are also useful in situations where you want to avoid the COM API for reasons of efficiency.
8989

90-
Note that the interface `Q` must have an IID associated with it that can be retrieved using the [__uuidof](../../cpp/uuidof-operator.md) operator.
90+
Note that the interface *Q* must have an IID associated with it that can be retrieved using the [__uuidof](../../cpp/uuidof-operator.md) operator.
9191

9292
### Example
93-
In the following example, `CDocument` is a wizard-generated ATL class derived from `CComCoClass` that implements the **IDocument** interface. The class is registered in the object map with the `OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO` macro so clients can't create instances of the document using [CoCreateInstance](http://msdn.microsoft.com/library/windows/desktop/ms686615). `CApplication` is a CoClass that provides a method on one of its own COM interfaces to create instances of the document class. The code below shows how easy it to create instances of the document class using the `CreateInstance` member inherited from the `CComCoClass` base class.
93+
In the following example, `CDocument` is a wizard-generated ATL class derived from `CComCoClass` that implements the `IDocument` interface. The class is registered in the object map with the OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO macro so clients can't create instances of the document using [CoCreateInstance](http://msdn.microsoft.com/library/windows/desktop/ms686615). `CApplication` is a CoClass that provides a method on one of its own COM interfaces to create instances of the document class. The code below shows how easy it to create instances of the document class using the `CreateInstance` member inherited from the `CComCoClass` base class.
9494

9595
[!code-cpp[NVC_ATL_COM#11](../../atl/codesnippet/cpp/ccomcoclass-class_2.cpp)]
9696

@@ -138,34 +138,33 @@ static HRESULT Error(
138138
```
139139

140140
### Parameters
141-
`lpszDesc`
142-
[in] The string describing the error. The Unicode version of `Error` specifies that `lpszDesc` is of type **LPCOLESTR**; the ANSI version specifies a type of `LPCSTR`.
141+
*lpszDesc*
142+
[in] The string describing the error. The Unicode version of `Error` specifies that *lpszDesc* is of type LPCOLESTR; the ANSI version specifies a type of LPCSTR.
143+
*iid*
144+
[in] The IID of the interface defining the error or GUID_NULL (the default value) if the error is defined by the operating system.
143145

144-
`iid`
145-
[in] The IID of the interface defining the error or `GUID_NULL` (the default value) if the error is defined by the operating system.
146+
*hRes*
147+
[in] The HRESULT you want returned to the caller. The default value is 0. For more details about *hRes*, see Remarks.
146148

147-
`hRes`
148-
[in] The `HRESULT` you want returned to the caller. The default value is 0. For more details about `hRes`, see Remarks.
149+
*nID*
150+
[in] The resource identifier where the error description string is stored. This value should lie between 0x0200 and 0xFFFF, inclusively. In debug builds, an **ASSERT** will result if *nID* does not index a valid string. In release builds, the error description string will be set to "Unknown Error."
149151

150-
`nID`
151-
[in] The resource identifier where the error description string is stored. This value should lie between 0x0200 and 0xFFFF, inclusively. In debug builds, an **ASSERT** will result if `nID` does not index a valid string. In release builds, the error description string will be set to "Unknown Error."
152-
153-
`dwHelpID`
152+
*dwHelpID*
154153
[in] The help context identifier for the error.
155154

156-
`lpszHelpFile`
155+
*lpszHelpFile*
157156
[in] The path and name of the help file describing the error.
158157

159-
`hInst`
160-
[in] The handle to the resource. By default, this parameter is **_AtlModule::GetResourceInstance**, where **_AtlModule** is the global instance of [CAtlModule](../../atl/reference/catlmodule-class.md).
158+
*hInst*
159+
[in] The handle to the resource. By default, this parameter is `_AtlModule::GetResourceInstance`, where `_AtlModule` is the global instance of [CAtlModule](../../atl/reference/catlmodule-class.md).
161160

162161
### Return Value
163-
A standard `HRESULT` value. For details, see Remarks.
162+
A standard HRESULT value. For details, see Remarks.
164163

165164
### Remarks
166165
To call `Error`, your object must implement the `ISupportErrorInfo Interface` interface.
167166

168-
If the `hRes` parameter is nonzero, then `Error` returns the value of `hRes`. If `hRes` is zero, then the first four versions of `Error` return `DISP_E_EXCEPTION`. The last two versions return the result of the macro **MAKE_HRESULT( 1, FACILITY_ITF,** `nID` **)**.
167+
If the *hRes* parameter is nonzero, then `Error` returns the value of *hRes*. If *hRes* is zero, then the first four versions of `Error` return DISP_E_EXCEPTION. The last two versions return the result of the macro **MAKE_HRESULT( 1, FACILITY_ITF,** *nID* **)**.
169168

170169
## <a name="getobjectclsid"></a> CComCoClass::GetObjectCLSID
171170
Provides a consistent way of retrieving the object's CLSID.
@@ -188,11 +187,11 @@ static LPCTSTR WINAPI GetObjectDescription();
188187
The class object's description.
189188

190189
### Remarks
191-
The default implementation returns **NULL**. You can override this method with the [DECLARE_OBJECT_DESCRIPTION](object-map-macros.md#declare_object_description) macro. For example:
190+
The default implementation returns NULL. You can override this method with the [DECLARE_OBJECT_DESCRIPTION](object-map-macros.md#declare_object_description) macro. For example:
192191

193192
[!code-cpp[NVC_ATL_COM#12](../../atl/codesnippet/cpp/ccomcoclass-class_3.h)]
194193

195-
`GetObjectDescription` is called by **IComponentRegistrar::GetComponents**. **IComponentRegistrar** is an Automation interface that allows you to register and unregister individual components in a DLL. When you create a Component Registrar object with the ATL Project Wizard, the wizard will automatically implement the **IComponentRegistrar** interface. **IComponentRegistrar** is typically used by Microsoft Transaction Server.
194+
`GetObjectDescription` is called by `IComponentRegistrar::GetComponents`. `IComponentRegistrar` is an Automation interface that allows you to register and unregister individual components in a DLL. When you create a Component Registrar object with the ATL Project Wizard, the wizard will automatically implement the `IComponentRegistrar` interface. `IComponentRegistrar` is typically used by Microsoft Transaction Server.
196195

197196
For more information about the ATL Project Wizard, see the article [Creating an ATL Project](../../atl/reference/creating-an-atl-project.md).
198197

docs/atl/reference/ccomcompositecontrol-class.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CComCompositeControl : public CComControl<T,CAxDialogImpl<T>>
2626
```
2727

2828
#### Parameters
29-
`T`
29+
*T*
3030
Your class, derived from [CComObjectRoot](../../atl/reference/ccomobjectroot-class.md) or [CComObjectRootEx](../../atl/reference/ccomobjectrootex-class.md), as well as from any other interfaces you want to support for your composite control.
3131

3232
## Members
@@ -43,7 +43,7 @@ class CComCompositeControl : public CComControl<T,CAxDialogImpl<T>>
4343
|Name|Description|
4444
|----------|-----------------|
4545
|[CComCompositeControl::AdviseSinkMap](#advisesinkmap)|Call this method to advise or unadvise all controls hosted by the composite control.|
46-
|[CComCompositeControl::CalcExtent](#calcextent)|Call this method to calculate the size in **HIMETRIC** units of the dialog resource used to host the composite control.|
46+
|[CComCompositeControl::CalcExtent](#calcextent)|Call this method to calculate the size in HIMETRIC units of the dialog resource used to host the composite control.|
4747
|[CComCompositeControl::Create](#create)|This method is called to create the control window for the composite control.|
4848
|[CComCompositeControl::CreateControlWindow](#createcontrolwindow)|Call this method to create the control window and advise any hosted control.|
4949
|[CComCompositeControl::SetBackgroundColorFromAmbient](#setbackgroundcolorfromambient)|Call this method to set the background color of the composite control using the container's background color.|
@@ -93,47 +93,47 @@ HRESULT AdviseSinkMap(bool bAdvise);
9393
```
9494

9595
### Parameters
96-
`bAdvise`
96+
*bAdvise*
9797
True if all controls are to be advised; otherwise false.
9898

9999
### Return Value
100-
`S_OK`
100+
S_OK
101101
All controls in the event sink map were connected or disconnected from their event source successfully.
102102

103-
**E_FAIL**
103+
E_FAIL
104104
Not all controls in the event sink map could be connected or disconnected from their event source successfully.
105105

106-
`E_POINTER`
106+
E_POINTER
107107
This error usually indicates a problem with an entry in the control's event sink map or a problem with a template argument used in an `IDispEventImpl` or `IDispEventSimpleImpl` base class.
108108

109-
**CONNECT_E_ADVISELIMIT**
109+
CONNECT_E_ADVISELIMIT
110110
The connection point has already reached its limit of connections and cannot accept any more.
111111

112-
**CONNECT_E_CANNOTCONNECT**
112+
CONNECT_E_CANNOTCONNECT
113113
The sink does not support the interface required by this connection point.
114114

115-
**CONNECT_E_NOCONNECTION**
115+
CONNECT_E_NOCONNECTION
116116
The cookie value does not represent a valid connection. This error usually indicates a problem with an entry in the control's event sink map or a problem with a template argument used in an `IDispEventImpl` or `IDispEventSimpleImpl` base class.
117117

118118
### Remarks
119119
The base implementation of this method searches through the entries in the event sink map. It then advises or unadvises the connection points to the COM objects described by the event sink map's sink entries. This member method also relies on the fact that the derived class inherits from one instance of `IDispEventImpl` for every control in the sink map that is to be advised or unadvised.
120120

121121
## <a name="calcextent"></a> CComCompositeControl::CalcExtent
122-
Call this method to calculate the size in **HIMETRIC** units of the dialog resource used to host the composite control.
122+
Call this method to calculate the size in HIMETRIC units of the dialog resource used to host the composite control.
123123

124124
```
125125
BOOL CalcExtent(SIZE& size);
126126
```
127127

128128
### Parameters
129-
`size`
130-
A reference to a **SIZE** structure to be filled by this method.
129+
*size*
130+
A reference to a `SIZE` structure to be filled by this method.
131131

132132
### Return Value
133133
TRUE if the control is hosted by a dialog box; otherwise FALSE.
134134

135135
### Remarks
136-
The size is returned in the `size` parameter.
136+
The size is returned in the *size* parameter.
137137

138138
## <a name="create"></a> CComCompositeControl::Create
139139
This method is called to create the control window for the composite control.
@@ -146,14 +146,14 @@ HWND Create(
146146
```
147147

148148
### Parameters
149-
`hWndParent`
149+
*hWndParent*
150150
A handle to the parent window of the control.
151151

152-
`rcPos`
152+
*rcPos*
153153
Reserved.
154154

155-
`dwInitParam`
156-
Data to be passed to the control during control creation. The data passed as `dwInitParam` will show up as the **LPARAM** parameter of the [WM_INITDIALOG](http://msdn.microsoft.com/library/windows/desktop/ms645428) message, which will be sent to the composite control when it gets created.
155+
*dwInitParam*
156+
Data to be passed to the control during control creation. The data passed as *dwInitParam* will show up as the LPARAM parameter of the [WM_INITDIALOG](http://msdn.microsoft.com/library/windows/desktop/ms645428) message, which will be sent to the composite control when it gets created.
157157

158158
### Return Value
159159
A handle to the newly created composite control dialog box.
@@ -191,11 +191,11 @@ virtual HWND CreateControlWindow(
191191
```
192192

193193
### Parameters
194-
`hWndParent`
194+
*hWndParent*
195195
A handle to the parent window of the control.
196196

197-
`rcPos`
198-
The position rectangle of the composite control in client coordinates relative to `hWndParent`.
197+
*rcPos*
198+
The position rectangle of the composite control in client coordinates relative to *hWndParent*.
199199

200200
### Return Value
201201
Returns a handle to the newly created composite control dialog box.

docs/atl/reference/ccomcontainedobject-class.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.author: "mblome"
1313
ms.workload: ["cplusplus"]
1414
---
1515
# CComContainedObject Class
16-
This class implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509) by delegating to the owner object's **IUnknown**.
16+
This class implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509) by delegating to the owner object's `IUnknown`.
1717

1818
> [!IMPORTANT]
1919
> This class and its members cannot be used in applications that execute in the Windows Runtime.
@@ -26,7 +26,7 @@ class CComContainedObject : public Base
2626
```
2727

2828
#### Parameters
29-
`Base`
29+
*Base*
3030
Your class, derived from [CComObjectRoot](../../atl/reference/ccomobjectroot-class.md) or [CComObjectRootEx](../../atl/reference/ccomobjectrootex-class.md).
3131

3232
## Members
@@ -48,7 +48,7 @@ class CComContainedObject : public Base
4848
|[CComContainedObject::Release](#release)|Decrements the reference count on the owner object.|
4949

5050
## Remarks
51-
ATL uses `CComContainedObject` in classes [CComAggObject](../../atl/reference/ccomaggobject-class.md), [CComPolyObject](../../atl/reference/ccompolyobject-class.md), and [CComCachedTearOffObject](../../atl/reference/ccomcachedtearoffobject-class.md). `CComContainedObject` implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509) by delegating to the owner object's **IUnknown**. (The owner is either the outer object of an aggregation, or the object for which a tear-off interface is being created.) `CComContainedObject` calls `CComObjectRootEx`'s `OuterQueryInterface`, `OuterAddRef`, and `OuterRelease`, all inherited through `Base`.
51+
ATL uses `CComContainedObject` in classes [CComAggObject](../../atl/reference/ccomaggobject-class.md), [CComPolyObject](../../atl/reference/ccompolyobject-class.md), and [CComCachedTearOffObject](../../atl/reference/ccomcachedtearoffobject-class.md). `CComContainedObject` implements [IUnknown](http://msdn.microsoft.com/library/windows/desktop/ms680509) by delegating to the owner object's `IUnknown`. (The owner is either the outer object of an aggregation, or the object for which a tear-off interface is being created.) `CComContainedObject` calls `CComObjectRootEx`'s `OuterQueryInterface`, `OuterAddRef`, and `OuterRelease`, all inherited through `Base`.
5252

5353
## Inheritance Hierarchy
5454
`Base`
@@ -76,11 +76,11 @@ CComContainedObject(void* pv);
7676
```
7777

7878
### Parameters
79-
`pv`
80-
[in] The owner object's **IUnknown**.
79+
*pv*
80+
[in] The owner object's `IUnknown`.
8181

8282
### Remarks
83-
Sets the `m_pOuterUnknown` member pointer (inherited through the `Base` class) to `pv`.
83+
Sets the `m_pOuterUnknown` member pointer (inherited through the `Base` class) to *pv*.
8484

8585
## <a name="dtor"></a> CComContainedObject::~CComContainedObject
8686
The destructor.
@@ -93,14 +93,14 @@ CComContainedObject(void* pv);
9393
Frees all allocated resources.
9494

9595
## <a name="getcontrollingunknown"></a> CComContainedObject::GetControllingUnknown
96-
Returns the `m_pOuterUnknown` member pointer (inherited through the *Base* class) that holds the owner object's **IUnknown**.
96+
Returns the `m_pOuterUnknown` member pointer (inherited through the *Base* class) that holds the owner object's `IUnknown`.
9797

9898
```
9999
IUnknown* GetControllingUnknown();
100100
```
101101

102102
### Return Value
103-
The owner object's **IUnknown**.
103+
The owner object's `IUnknown`.
104104

105105
### Remarks
106106
This method may be virtual if `Base` has declared the [DECLARE_GET_CONTROLLING_UNKNOWN](aggregation-and-class-factory-macros.md#declare_get_controlling_unknown) macro.
@@ -115,17 +115,17 @@ HRESULT STDMETHODCALLTYPE QueryInterface(Q** pp);
115115
```
116116

117117
### Parameters
118-
`iid`
118+
*iid*
119119
[in] The identifier of the interface being requested.
120120

121-
`ppvObject`
122-
[out] A pointer to the interface pointer identified by `iid`. If the object does not support this interface, `ppvObject` is set to **NULL**.
121+
*ppvObject*
122+
[out] A pointer to the interface pointer identified by *iid*. If the object does not support this interface, *ppvObject* is set to NULL.
123123

124-
`pp`
125-
[out] A pointer to the interface pointer identified by type `Q`. If the object does not support this interface, `pp` is set to **NULL**.
124+
*pp*
125+
[out] A pointer to the interface pointer identified by type `Q`. If the object does not support this interface, *pp* is set to NULL.
126126

127127
### Return Value
128-
A standard `HRESULT` value.
128+
A standard HRESULT value.
129129

130130
## <a name="release"></a> CComContainedObject::Release
131131
Decrements the reference count on the owner object.
@@ -135,7 +135,7 @@ STDMETHOD_(ULONG, Release)();
135135
```
136136

137137
### Return Value
138-
In debug builds, **Release** returns a value that may be useful for diagnostics or testing. In non-debug builds, **Release** always returns 0.
138+
In debug builds, `Release` returns a value that may be useful for diagnostics or testing. In non-debug builds, `Release` always returns 0.
139139

140140
## See Also
141141
[Class Overview](../../atl/atl-class-overview.md)

0 commit comments

Comments
 (0)