Skip to content

Commit ab97683

Browse files
authored
Merge pull request #1010 from msebolt/format-mfc-reference-pr17
format-mfc-reference-pr17
2 parents f16949e + 64e15fc commit ab97683

30 files changed

+667
-669
lines changed

docs/mfc/reference/event-sink-maps.md

+61-61
Large diffs are not rendered by default.

docs/mfc/reference/exception-processing.md

+43-43
Large diffs are not rendered by default.

docs/mfc/reference/extension-dll-macros.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ ms.workload: ["cplusplus"]
2727

2828

2929
## <a name="afx_ext_class"></a> AFX_EXT_CLASS
30-
[MFC extension DLLs](../../build/extension-dlls.md) use the macro **AFX_EXT_CLASS** to export classes; the executables that link to the MFC extension DLL use the macro to import classes.
30+
[MFC extension DLLs](../../build/extension-dlls.md) use the macro AFX_EXT_CLASS to export classes; the executables that link to the MFC extension DLL use the macro to import classes.
3131

3232
### Remarks
33-
With the **AFX_EXT_CLASS** macro, the same header file(s) used to build the MFC extension DLL can be used with the executables that link to the DLL.
33+
With the AFX_EXT_CLASS macro, the same header file(s) used to build the MFC extension DLL can be used with the executables that link to the DLL.
3434

35-
In the header file for your DLL, add the **AFX_EXT_CLASS** keyword to the declaration of your class as follows:
35+
In the header file for your DLL, add the AFX_EXT_CLASS keyword to the declaration of your class as follows:
3636

3737
```cpp
3838
class AFX_EXT_CLASS CMyClass : public CDocument
@@ -54,11 +54,11 @@ Call this macro to protect an exported function in a DLL.
5454
AFX_MANAGE_STATE(AFX_MODULE_STATE* pModuleState )
5555
```
5656
### Parameters
57-
`pModuleState`
57+
*pModuleState*
5858
A pointer to an `AFX_MODULE_STATE` structure.
5959

6060
### Remarks
61-
When this macro is invoked, `pModuleState` is the effective module state for the remainder of the immediate containing scope. Upon leaving the scope, the previous effective module state will be automatically restored.
61+
When this macro is invoked, *pModuleState* is the effective module state for the remainder of the immediate containing scope. Upon leaving the scope, the previous effective module state will be automatically restored.
6262
The `AFX_MODULE_STATE` structure contains global data for the module, that is, the portion of the module state that is pushed or popped.
6363
By default, MFC uses the resource handle of the main application to load the resource template. If you have an exported function in a DLL, such as one that launches a dialog box in the DLL, this template is actually stored in the DLL module. You need to switch the module state for the correct handle to be used. You can do this by adding the following code to the beginning of the function:
6464
```cpp
@@ -84,9 +84,9 @@ void AFXAPI AfxOleInitModule( );
8484
```
8585
8686
### Remarks
87-
The MFC OLE DLL is an MFC extension DLL; in order for an MFC extension DLL to get wired into a **CDynLinkLibrary** chain, it must create a **CDynLinkLibrary** object in the context of every module that will be using it. `AfxOleInitModule` creates the **CDynLinkLibrary** object in your regular MFC DLL's context so that it gets wired into the **CDynLinkLibrary** object chain of the regular MFC DLL.
87+
The MFC OLE DLL is an MFC extension DLL; in order for an MFC extension DLL to get wired into a `CDynLinkLibrary` chain, it must create a `CDynLinkLibrary` object in the context of every module that will be using it. `AfxOleInitModule` creates the `CDynLinkLibrary` object in your regular MFC DLL's context so that it gets wired into the `CDynLinkLibrary` object chain of the regular MFC DLL.
8888
89-
If you are building an OLE control and are using `COleControlModule`, you should not call **AfxOleInitModule** because the `InitInstance` member function for `COleControlModule` calls `AfxOleInitModule`.
89+
If you are building an OLE control and are using `COleControlModule`, you should not call `AfxOleInitModule` because the `InitInstance` member function for `COleControlModule` calls `AfxOleInitModule`.
9090
9191
### Requirements
9292
**Header**: <afxdll_.h>
@@ -96,15 +96,15 @@ void AFXAPI AfxOleInitModule( );
9696
[AfxMessageBox](cstring-formatting-and-message-box-display.md#afxmessagebox)
9797
9898
## <a name="afxnetinitmodule"></a> AfxNetInitModule
99-
For MFC Sockets support from a regular MFC DLL that is dynamically linked to MFC, add a call to this function in your regular MFC DLL's **CWinApp::InitInstance** function to initialize the MFC Sockets DLL.
99+
For MFC Sockets support from a regular MFC DLL that is dynamically linked to MFC, add a call to this function in your regular MFC DLL's `CWinApp::InitInstance` function to initialize the MFC Sockets DLL.
100100
101101
### Syntax
102102
```
103103
void AFXAPI AfxNetInitModule( );
104104
```
105105
106106
### Remarks
107-
The MFC Sockets DLL is an MFC extension DLL; in order for an MFC extension DLL to get wired into a **CDynLinkLibrary** chain, it must create a **CDynLinkLibrary** object in the context of every module that will be using it. `AfxNetInitModule` creates the **CDynLinkLibrary** object in your regular MFC DLL's context so that it gets wired into the **CDynLinkLibrary** object chain of the regular MFC DLL.
107+
The MFC Sockets DLL is an MFC extension DLL; in order for an MFC extension DLL to get wired into a `CDynLinkLibrary` chain, it must create a `CDynLinkLibrary` object in the context of every module that will be using it. `AfxNetInitModule` creates the `CDynLinkLibrary` object in your regular MFC DLL's context so that it gets wired into the `CDynLinkLibrary` object chain of the regular MFC DLL.
108108
109109
### Requirements
110110
**Header:** <afxdll_.h>
@@ -177,14 +177,14 @@ Call this function in an MFC extension DLL's `DllMain` to initialize the DLL.
177177
BOOL AFXAPI AfxInitExtensionModule( AFX_EXTENSION_MODULE& state, HMODULE hModule );
178178
```
179179
### Parameters
180-
`state`
180+
*state*
181181
A reference to the [AFX_EXTENSION_MODULE Structure](afx-extension-module-structure.md) structure that will contain the state of the MFC extension DLL module after the initialization. The state includes a copy of the runtime class objects that have been initialized by the MFC extension DLL as part of normal static object construction executed before `DllMain` is entered.
182182

183-
`hModule`
183+
*hModule*
184184
A handle of the MFC extension DLL module.
185185

186186
### Return Value
187-
**TRUE** if the MFC extension DLL is successfully initialized; otherwise, **FALSE**.
187+
TRUE if the MFC extension DLL is successfully initialized; otherwise, FALSE.
188188

189189
### Remarks
190190
For example:
@@ -207,10 +207,10 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
207207

208208
```
209209
210-
`AfxInitExtensionModule` makes a copy of the DLL's **HMODULE** and captures the DLL's runtime-classes (`CRuntimeClass` structures) as well as its object factories (`COleObjectFactory` objects) for use later when the **CDynLinkLibrary** object is created.
210+
`AfxInitExtensionModule` makes a copy of the DLL's HMODULE and captures the DLL's runtime-classes (`CRuntimeClass` structures) as well as its object factories (`COleObjectFactory` objects) for use later when the `CDynLinkLibrary` object is created.
211211
MFC extension DLLs need to do two things in their `DllMain` function:
212212
- Call [AfxInitExtensionModule](#_mfc_afxinitextensionmodule) and check the return value.
213-
- Create a **CDynLinkLibrary** object if the DLL will be exporting [CRuntimeClass Structure](cruntimeclass-structure.md) objects or has its own custom resources.
213+
- Create a `CDynLinkLibrary` object if the DLL will be exporting [CRuntimeClass Structure](cruntimeclass-structure.md) objects or has its own custom resources.
214214
You can call `AfxTermExtensionModule` to clean up the MFC extension DLL when each process detaches from the MFC extension DLL (which happens when the process exits, or when the DLL is unloaded as a result of an `AfxFreeLibrary` call).
215215
216216
### Requirements
@@ -229,7 +229,7 @@ Use this function to set the per-module state flag, which affects the WinSxS beh
229229
);
230230
```
231231
### Parameters
232-
`bSet`
232+
*bSet*
233233
New value of the module state flag.
234234
235235
### Remarks
@@ -263,11 +263,11 @@ Call this function to allow MFC to cleanup the MFC extension DLL when each proce
263263
void AFXAPI AfxTermExtensionModule( AFX_EXTENSION_MODULE& state, BOOL bAll = FALSE );
264264
```
265265
### Parameters
266-
`state`
266+
*state*
267267
A reference to the [AFX_EXTENSION_MODULE](afx-extension-module-structure.md) structure that contains the state of MFC extension DLL module.
268268

269269
*bAll*
270-
If **TRUE**, cleanup all MFC extension DLL modules. Otherwise, cleanup only the current DLL module.
270+
If TRUE, cleanup all MFC extension DLL modules. Otherwise, cleanup only the current DLL module.
271271

272272
### Remarks
273273
`AfxTermExtensionModule` will delete any local storage attached to the module and remove any entries from the message map cache. For example:
@@ -305,7 +305,7 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
305305
306306
If your application loads and frees MFC extension DLLs dynamically, be sure to call `AfxTermExtensionModule`. Since most MFC extension DLLs are not dynamically loaded (usually, they are linked via their import libraries), the call to `AfxTermExtensionModule` is usually not necessary.
307307
308-
MFC extension DLLs need to call [AfxInitExtensionModule](#afxinitextensionmodule) in their `DllMain`. If the DLL will be exporting [CRuntimeClass](cruntimeclass-structure.md) objects or has its own custom resources, you also need to create a **CDynLinkLibrary** object in `DllMain`.
308+
MFC extension DLLs need to call [AfxInitExtensionModule](#afxinitextensionmodule) in their `DllMain`. If the DLL will be exporting [CRuntimeClass](cruntimeclass-structure.md) objects or has its own custom resources, you also need to create a `CDynLinkLibrary` object in `DllMain`.
309309
310310
### Requirements
311311
**Header:** afxdll_.h

docs/mfc/reference/gray-and-dithered-bitmap-functions.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void AFXAPI AfxDrawGrayBitmap(
4848
```
4949

5050
### Parameters
51-
`pDC`
51+
*pDC*
5252
Points to the destination DC.
5353

5454
*x*
@@ -57,10 +57,10 @@ void AFXAPI AfxDrawGrayBitmap(
5757
*y*
5858
The destination y-coordinate.
5959

60-
`rSrc`
60+
*rSrc*
6161
The source bitmap.
6262

63-
`crBackground`
63+
*crBackground*
6464
The new background color (typically gray, such as COLOR_MENU).
6565

6666
### Remarks
@@ -85,13 +85,13 @@ void AFXAPI AfxGetGrayBitmap(
8585
```
8686

8787
### Parameters
88-
`rSrc`
88+
*rSrc*
8989
The source bitmap.
9090

91-
`pDest`
91+
*pDest*
9292
The destination bitmap.
9393

94-
`crBackground`
94+
*crBackground*
9595
The new background color (typically gray, such as COLOR_MENU).
9696

9797
### Remarks
@@ -119,7 +119,7 @@ void AFXAPI AfxDrawDitheredBitmap(
119119
```
120120

121121
### Parameters
122-
`pDC`
122+
*pDC*
123123
Points to the destination DC.
124124

125125
*x*
@@ -128,17 +128,17 @@ void AFXAPI AfxDrawDitheredBitmap(
128128
*y*
129129
The destination y-coordinate.
130130

131-
`rSrc`
131+
*rSrc*
132132
The source bitmap.
133133

134-
`cr1`
134+
*cr1*
135135
One of the two dither colors, typically white.
136136

137-
`cr2`
137+
*cr2*
138138
The other dither color, typically light gray (COLOR_MENU).
139139

140140
### Remarks
141-
The source bitmap is drawn on the destination DC with a two-color ( `cr1` and `cr2`) checkered pattern replacing the bitmap's background. The background of the source bitmap is defined as its white pixels and all pixels matching the color of the pixel in the upper-left corner of the bitmap.
141+
The source bitmap is drawn on the destination DC with a two-color (*cr1* and *cr2*) checkered pattern replacing the bitmap's background. The background of the source bitmap is defined as its white pixels and all pixels matching the color of the pixel in the upper-left corner of the bitmap.
142142

143143
![Comparison of dithered and original icon versions](../../mfc/reference/media/vcditheredbitmap.gif "vcditheredbitmap")
144144

@@ -161,20 +161,20 @@ void AFXAPI AfxGetDitheredBitmap(
161161
```
162162

163163
### Parameters
164-
`rSrc`
164+
*rSrc*
165165
The source bitmap.
166166

167-
`pDest`
167+
*pDest*
168168
The destination bitmap.
169169

170-
`cr1`
170+
*cr1*
171171
One of the two dither colors, typically white.
172172

173-
`cr2`
173+
*cr2*
174174
The other dither color, typically light gray (COLOR_MENU).
175175

176176
### Remarks
177-
The source bitmap is copied to the destination bitmap with a two-color ( `cr1` and `cr2`) checkered pattern replacing the source bitmap's background. The background of the source bitmap is defined as its white pixels and all pixels matching the color of the pixel in the upper-left corner of the bitmap.
177+
The source bitmap is copied to the destination bitmap with a two-color (*cr1* and *cr2*) checkered pattern replacing the source bitmap's background. The background of the source bitmap is defined as its white pixels and all pixels matching the color of the pixel in the upper-left corner of the bitmap.
178178

179179
![Comparison of dithered and original icon versions](../../mfc/reference/media/vcditheredbitmap.gif "vcditheredbitmap")
180180

docs/mfc/reference/handlers-for-wm-messages.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ The following topics correspond to the map entries.
1717

1818
|Topic|Map entries|
1919
|-----------|-----------------|
20-
|[A - C](../../mfc/reference/wm-message-handlers-a-c.md)|**ON_WM_ACTIVATE** through **ON_WM_CTLCOLOR**|
21-
|[D - E](../../mfc/reference/wm-message-handlers-d-e.md)|**ON_WM_DEADCHAR** through **ON_WM_ERASEBKGND**|
22-
|[F - K](../../mfc/reference/wm-message-handlers-f-k.md)|**ON_WM_FONTCHANGE** through **ON_WM_KILLFOCUS**|
23-
|[L - M](../../mfc/reference/wm-message-handlers-l-m.md)|**ON_WM_LBUTTONDBLCLK** through **ON_WM_MOVING**|
24-
|[N - O](../../mfc/reference/wm-message-handlers-n-o.md)|**ON_WM_NCACTIVATE** through **ON_WM_NCRBUTTONUP**|
25-
|[P - R](../../mfc/reference/wm-messages-p-r.md)|**ON_WM_PAINT** through **ON_WM_RENDERFORMAT**|
26-
|[S](../../mfc/reference/wm-messages-s.md)|**ON_WM_SETCURSOR** through **ON_WM_SYSKEYUP**|
27-
|[T - Z](../../mfc/reference/wm-messages-t-z.md)|**ON_WM_TIMECHANGE** through **ON_WM_WININICHANGE**|
20+
|[A - C](../../mfc/reference/wm-message-handlers-a-c.md)|ON_WM_ACTIVATE through ON_WM_CTLCOLOR|
21+
|[D - E](../../mfc/reference/wm-message-handlers-d-e.md)|ON_WM_DEADCHAR through ON_WM_ERASEBKGND|
22+
|[F - K](../../mfc/reference/wm-message-handlers-f-k.md)|ON_WM_FONTCHANGE through ON_WM_KILLFOCUS|
23+
|[L - M](../../mfc/reference/wm-message-handlers-l-m.md)|ON_WM_LBUTTONDBLCLK through ON_WM_MOVING|
24+
|[N - O](../../mfc/reference/wm-message-handlers-n-o.md)|ON_WM_NCACTIVATE through ON_WM_NCRBUTTONUP|
25+
|[P - R](../../mfc/reference/wm-messages-p-r.md)|ON_WM_PAINT through ON_WM_RENDERFORMAT|
26+
|[S](../../mfc/reference/wm-messages-s.md)|ON_WM_SETCURSOR through ON_WM_SYSKEYUP|
27+
|[T - Z](../../mfc/reference/wm-messages-t-z.md)|ON_WM_TIMECHANGE through ON_WM_WININICHANGE|
2828

2929
## See Also
3030
[Message Maps](../../mfc/reference/message-maps-mfc.md)

docs/mfc/reference/how-to-use-the-message-map-cross-reference.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ In entries labeled \<memberFxn>, write your own member function for a derived [C
2121

2222
|Term|Definition|
2323
|----------|----------------|
24-
|id|Any user-defined menu item ID (**WM_COMMAND** messages) or control ID (child window notification messages).|
24+
|id|Any user-defined menu item ID (WM_COMMAND messages) or control ID (child window notification messages).|
2525
|"message" and "wNotifyCode"|Windows message IDs as defined in WINDOWS.H.|
26-
|nMessageVariable|Name of a variable that contains the return value from the **RegisterWindowMessage** Windows function.|
26+
|nMessageVariable|Name of a variable that contains the return value from the `RegisterWindowMessage` Windows function.|
2727

2828
## See Also
2929
[Message Maps](../../mfc/reference/message-maps-mfc.md)

docs/mfc/reference/hse-version-info-structure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.author: "mblome"
1313
ms.workload: ["cplusplus"]
1414
---
1515
# HSE_VERSION_INFO Structure
16-
This structure is pointed to by the `pVer` parameter in the `CHttpServer::GetExtensionVersion` member function. It provides the ISA version number and a text description of the ISA.
16+
This structure is pointed to by the *pVer* parameter in the `CHttpServer::GetExtensionVersion` member function. It provides the ISA version number and a text description of the ISA.
1717

1818
## Syntax
1919

docs/mfc/reference/icommandsource-interface.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ void AddCommandHandler(
5757
```
5858

5959
### Parameters
60-
`cmdID`
60+
*cmdID*
6161
The command ID.
62-
`cmdHandler`
62+
*cmdHandler*
6363
A handle to the command handler method.
6464

6565
### Remarks
@@ -76,11 +76,11 @@ void AddCommandRangeHandler(
7676
CommandHandler^ cmdHandler);
7777
```
7878
### Parameters
79-
`cmdIDMin`
79+
*cmdIDMin*
8080
The beginning index of the command ID range.
81-
`cmdIDMax`
81+
*cmdIDMax*
8282
The ending index of the command ID range.
83-
`cmdHandler`
83+
*cmdHandler*
8484
A handle to the message handler method to which the commands are mapped.
8585
### Remarks
8686
This method maps a contiguous range of command IDs to a single message handler and adds it to the command source object. This is used for handling a group of related buttons with one method.
@@ -94,11 +94,11 @@ void AddCommandRangeUIHandler(
9494
CommandUIHandler^ cmdUIHandler);
9595
```
9696
### Parameters
97-
`cmdIDMin`
97+
*cmdIDMin*
9898
The beginning index of the command ID range.
99-
`cmdIDMax`
99+
*cmdIDMax*
100100
The ending index of the command ID range.
101-
`cmdHandler`
101+
*cmdHandler*
102102
A handle to the message handler method to which the commands are mapped.
103103

104104
### Remarks
@@ -112,9 +112,9 @@ void AddCommandUIHandler(
112112
CommandUIHandler^ cmdUIHandler);
113113
```
114114
### Parameters
115-
`cmdID`
115+
*cmdID*
116116
The command ID.
117-
`cmdUIHandler`
117+
*cmdUIHandler*
118118
A handle to the user interface command message handler method.
119119

120120
### Remarks
@@ -126,7 +126,7 @@ Posts a message without waiting for it to be processed.
126126
void PostCommand(unsigned int command);
127127
```
128128
### Parameters
129-
`command`
129+
*command*
130130
The command ID of the message to be posted.
131131
### Remarks
132132
This method asynchronously posts the message mapped to the ID specified by command. It calls CWnd::PostMessage to place the message in the window's message queue and then returns without waiting for the corresponding window to process the message.
@@ -138,7 +138,7 @@ Removes a command handler from a command source object.
138138
void RemoveCommandHandler(unsigned int cmdID);
139139
```
140140
### Parameters
141-
`cmdID`
141+
*cmdID*
142142
The command ID.
143143
### Remarks
144144
This method removes the command handler mapped to cmdID from the command source object.
@@ -152,9 +152,9 @@ void RemoveCommandRangeUIHandler(
152152
unsigned int cmdIDMax);
153153
```
154154
### Parameters
155-
`cmdIDMin`
155+
*cmdIDMin*
156156
The beginning index of the command ID range.
157-
`cmdIDMax`
157+
*cmdIDMax*
158158
The ending index of the command ID range.
159159
### Remarks
160160
This method removes a group of message handlers, mapped to the command IDs specifed by cmdIDMin and cmdIDMax, from the command source object.
@@ -167,9 +167,9 @@ void RemoveCommandRangeUIHandler(
167167
unsigned int cmdIDMax);
168168
```
169169
### Parameters
170-
`cmdIDMin`
170+
*cmdIDMin*
171171
The beginning index of the command ID range.
172-
`cmdIDMax`
172+
*cmdIDMax*
173173
The ending index of the command ID range.
174174
### Remarks
175175
This method removes a group of user interface command message handlers, mapped to the command IDs specifed by cmdIDMin and cmdIDMax, from the command source object.
@@ -180,7 +180,7 @@ Removes a user interface command message handler from a command source object.
180180
void RemoveCommandUIHandler(unsigned int cmdID);
181181
```
182182
### Parameters
183-
`cmdID`
183+
*cmdID*
184184
The command ID.
185185
### Remarks
186186
This method removes the user interface command message handler mapped to cmdID from the command source object.
@@ -191,7 +191,7 @@ Sends a message and waits for it to be processed before returning.
191191
void SendCommand(unsigned int command);
192192
```
193193
### Parameters
194-
`command`
194+
*command*
195195
The command ID of the message to be sent.
196196
### Remarks
197197
This method synchronously sends the message mapped to the ID specified by command. It calls CWnd::SendMessage to place the message in the window's message queue and waits until that window procedure has processed the message before returning.

docs/mfc/reference/icommandtarget-interface.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void Initialize(ICommandSource^ cmdSource);
4747
```
4848

4949
### Parameters
50-
`cmdSource`
50+
*cmdSource*
5151
A handle to the command source object.
5252

5353
### Remarks

0 commit comments

Comments
 (0)