Skip to content

Commit 2d17e95

Browse files
authored
Update CMFCPreviewCtrlImpl class reference
1 parent fe00e93 commit 2d17e95

File tree

1 file changed

+82
-79
lines changed

1 file changed

+82
-79
lines changed
Lines changed: 82 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
---
2-
description: "Learn more about: CMFCPreviewCtrlImpl Class"
32
title: "CMFCPreviewCtrlImpl Class"
3+
description: "Learn more about: CMFCPreviewCtrlImpl Class"
44
ms.date: "11/04/2016"
55
f1_keywords: ["CMFCPreviewCtrlImpl", "AFXWIN/CMFCPreviewCtrlImpl", "AFXWIN/CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl", "AFXWIN/CMFCPreviewCtrlImpl::Create", "AFXWIN/CMFCPreviewCtrlImpl::Destroy", "AFXWIN/CMFCPreviewCtrlImpl::Focus", "AFXWIN/CMFCPreviewCtrlImpl::GetDocument", "AFXWIN/CMFCPreviewCtrlImpl::Redraw", "AFXWIN/CMFCPreviewCtrlImpl::SetDocument", "AFXWIN/CMFCPreviewCtrlImpl::SetHost", "AFXWIN/CMFCPreviewCtrlImpl::SetPreviewVisuals", "AFXWIN/CMFCPreviewCtrlImpl::SetRect", "AFXWIN/CMFCPreviewCtrlImpl::DoPaint", "AFXWIN/CMFCPreviewCtrlImpl::m_clrBackColor", "AFXWIN/CMFCPreviewCtrlImpl::m_clrTextColor", "AFXWIN/CMFCPreviewCtrlImpl::m_font", "AFXWIN/CMFCPreviewCtrlImpl::m_pDocument"]
66
helpviewer_keywords: ["CMFCPreviewCtrlImpl [MFC], CMFCPreviewCtrlImpl", "CMFCPreviewCtrlImpl [MFC], Create", "CMFCPreviewCtrlImpl [MFC], Destroy", "CMFCPreviewCtrlImpl [MFC], Focus", "CMFCPreviewCtrlImpl [MFC], GetDocument", "CMFCPreviewCtrlImpl [MFC], Redraw", "CMFCPreviewCtrlImpl [MFC], SetDocument", "CMFCPreviewCtrlImpl [MFC], SetHost", "CMFCPreviewCtrlImpl [MFC], SetPreviewVisuals", "CMFCPreviewCtrlImpl [MFC], SetRect", "CMFCPreviewCtrlImpl [MFC], DoPaint", "CMFCPreviewCtrlImpl [MFC], m_clrBackColor", "CMFCPreviewCtrlImpl [MFC], m_clrTextColor", "CMFCPreviewCtrlImpl [MFC], m_font", "CMFCPreviewCtrlImpl [MFC], m_pDocument"]
7-
ms.assetid: 06257fa0-54c9-478d-9d68-c9698c3f93ed
87
---
9-
# CMFCPreviewCtrlImpl Class
8+
# `CMFCPreviewCtrlImpl` Class
109

1110
This class implements a window that is placed on a host window provided by the Shell for Rich Preview.
1211

1312
## Syntax
1413

15-
```
14+
```cpp
1615
class CMFCPreviewCtrlImpl : public CWnd;
1716
```
1817

@@ -22,282 +21,286 @@ class CMFCPreviewCtrlImpl : public CWnd;
2221

2322
|Name|Description|
2423
|----------|-----------------|
25-
|[CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl](#dtor)|Destructs a preview control object.|
26-
|[CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl](#cmfcpreviewctrlimpl)|Constructs a preview control object.|
24+
|[`CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl`](#dtor)|Destructs a preview control object.|
25+
|[`CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl`](#cmfcpreviewctrlimpl)|Constructs a preview control object.|
2726

2827
### Public Methods
2928

3029
|Name|Description|
3130
|----------|-----------------|
32-
|[CMFCPreviewCtrlImpl::Create](#create)|Overloaded. Called by a Rich Preview handler to create the Windows window.|
33-
|[CMFCPreviewCtrlImpl::Destroy](#destroy)|Called by a Rich Preview handler when it needs to destroy this control.|
34-
|[CMFCPreviewCtrlImpl::Focus](#focus)|Sets input focus to this control.|
35-
|[CMFCPreviewCtrlImpl::GetDocument](#getdocument)|Returns a document connected to this preview control.|
36-
|[CMFCPreviewCtrlImpl::Redraw](#redraw)|Tells this control to redraw.|
37-
|[CMFCPreviewCtrlImpl::SetDocument](#setdocument)|Called by the preview handler to create a relationship between the document implementation and the preview control.|
38-
|[CMFCPreviewCtrlImpl::SetHost](#sethost)|Sets a new parent for this control.|
39-
|[CMFCPreviewCtrlImpl::SetPreviewVisuals](#setpreviewvisuals)|Called by a Rich Preview handler when it needs to set visuals of rich preview content.|
40-
|[CMFCPreviewCtrlImpl::SetRect](#setrect)|Sets a new bounding rectangle for this control.|
31+
|[`CMFCPreviewCtrlImpl::Create`](#create)|Overloaded. Called by a Rich Preview handler to create the Windows window.|
32+
|[`CMFCPreviewCtrlImpl::Destroy`](#destroy)|Called by a Rich Preview handler when it needs to destroy this control.|
33+
|[`CMFCPreviewCtrlImpl::Focus`](#focus)|Sets input focus to this control.|
34+
|[`CMFCPreviewCtrlImpl::GetDocument`](#getdocument)|Returns a document connected to this preview control.|
35+
|[`CMFCPreviewCtrlImpl::Redraw`](#redraw)|Tells this control to redraw.|
36+
|[`CMFCPreviewCtrlImpl::SetDocument`](#setdocument)|Called by the preview handler to create a relationship between the document implementation and the preview control.|
37+
|[`CMFCPreviewCtrlImpl::SetHost`](#sethost)|Sets a new parent for this control.|
38+
|[`CMFCPreviewCtrlImpl::SetPreviewVisuals`](#setpreviewvisuals)|Called by a Rich Preview handler when it needs to set visuals of rich preview content.|
39+
|[`CMFCPreviewCtrlImpl::SetRect`](#setrect)|Sets a new bounding rectangle for this control.|
4140

4241
### Protected Methods
4342

4443
|Name|Description|
4544
|----------|-----------------|
46-
|[CMFCPreviewCtrlImpl::DoPaint](#dopaint)|Called by the framework to render the preview.|
45+
|[`CMFCPreviewCtrlImpl::DoPaint`](#dopaint)|Called by the framework to render the preview.|
4746

4847
### Protected Data Members
4948

5049
|Name|Description|
5150
|----------|-----------------|
52-
|[CMFCPreviewCtrlImpl::m_clrBackColor](#m_clrbackcolor)|Background color of preview window.|
53-
|[CMFCPreviewCtrlImpl::m_clrTextColor](#m_clrtextcolor)|Text color of preview window.|
54-
|[CMFCPreviewCtrlImpl::m_font](#m_font)|Font used to display text in the preview window.|
55-
|[CMFCPreviewCtrlImpl::m_pDocument](#m_pdocument)|A pointer to a document whose content is previewed in the control.|
51+
|[`CMFCPreviewCtrlImpl::m_clrBackColor`](#m_clrbackcolor)|Background color of preview window.|
52+
|[`CMFCPreviewCtrlImpl::m_clrTextColor`](#m_clrtextcolor)|Text color of preview window.|
53+
|[`CMFCPreviewCtrlImpl::m_font`](#m_font)|Font used to display text in the preview window.|
54+
|[`CMFCPreviewCtrlImpl::m_pDocument`](#m_pdocument)|A pointer to a document whose content is previewed in the control.|
5655

5756
## Requirements
5857

5958
**Header:** afxwin.h
6059

6160
## Inheritance Hierarchy
6261

63-
[CObject](../../mfc/reference/cobject-class.md)
62+
[CObject](cobject-class.md)
6463

65-
[CCmdTarget](../../mfc/reference/ccmdtarget-class.md)
64+
[CCmdTarget](ccmdtarget-class.md)
6665

67-
[CWnd](../../mfc/reference/cwnd-class.md)
66+
[CWnd](cwnd-class.md)
6867

69-
[CMFCPreviewCtrlImpl](../../mfc/reference/cmfcpreviewctrlimpl-class.md)
68+
[CMFCPreviewCtrlImpl](cmfcpreviewctrlimpl-class.md)
7069

71-
## <a name="cmfcpreviewctrlimpl"></a> CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl
70+
## <a name="cmfcpreviewctrlimpl"></a> `CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl`
7271

7372
Constructs a preview control object.
7473

7574
### Syntax
7675

76+
```cpp
7777
CMFCPreviewCtrlImpl();
78+
```
7879

79-
## <a name="create"></a> CMFCPreviewCtrlImpl::Create
80+
## <a name="create"></a> `CMFCPreviewCtrlImpl::Create`
8081

8182
Overloaded. Called by a Rich Preview handler to create the Windows window.
8283

8384
### Syntax
8485

85-
```
86+
```cpp
8687
virtual BOOL Create(
87-
HWND hWndParent,
88-
const RECT* prc
88+
HWND hWndParent,
89+
const RECT* prc
8990
);
9091
virtual BOOL Create(
91-
HWND hWndParent,
92-
const RECT* prc,
93-
CCreateContext* pContext
92+
HWND hWndParent,
93+
const RECT* prc,
94+
CCreateContext* pContext
9495
);
9596
```
9697

9798
### Parameters
9899

99-
*hWndParent*<br/>
100+
*`hWndParent`*\
100101
A handle to the host window supplied by the Shell for Rich Preview.
101102

102-
*prc*<br/>
103+
*`prc`*\
103104
Specifies the initial size and position of the window.
104105

105-
*pContext*<br/>
106+
*`pContext`*\
106107
A pointer to a creation context.
107108

108109
### Return Value
109110

110-
TRUE if creation succeeded; otherwise FALSE.
111+
`TRUE` if creation succeeded; otherwise `FALSE`.
111112

112-
## <a name="destroy"></a> CMFCPreviewCtrlImpl::Destroy
113+
## <a name="destroy"></a> `CMFCPreviewCtrlImpl::Destroy`
113114

114115
Called by a Rich Preview handler when it needs to destroy this control.
115116

116117
### Syntax
117118

118-
```
119+
```cpp
119120
virtual void Destroy();
120121
```
121122

122-
## <a name="dopaint"></a> CMFCPreviewCtrlImpl::DoPaint
123+
## <a name="dopaint"></a> `CMFCPreviewCtrlImpl::DoPaint`
123124

124125
Called by the framework to render the preview.
125126

126127
### Syntax
127128

128-
```
129+
```cpp
129130
virtual void DoPaint(
130-
CPaintDC* pDC
131+
CPaintDC* pDC
131132
);
132133
```
133134

134135
### Parameters
135136

136-
*pDC*<br/>
137+
*`pDC`*\
137138
A pointer to a device context for painting.
138139

139-
## <a name="focus"></a> CMFCPreviewCtrlImpl::Focus
140+
## <a name="focus"></a> `CMFCPreviewCtrlImpl::Focus`
140141

141142
Sets input focus to this control.
142143

143144
### Syntax
144145

145-
```
146+
```cpp
146147
virtual void Focus();
147148
```
148149

149-
## <a name="getdocument"></a> CMFCPreviewCtrlImpl::GetDocument
150+
## <a name="getdocument"></a> `CMFCPreviewCtrlImpl::GetDocument`
150151

151152
Returns a document connected to this preview control.
152153

153154
### Syntax
154155

155-
```
156+
```cpp
156157
ATL::IDocument* GetDocument();
157158
```
158159

159160
### Return Value
160161

161162
A pointer to a document, whose content is previewed in the control.
162163

163-
## <a name="m_clrbackcolor"></a> CMFCPreviewCtrlImpl::m_clrBackColor
164+
## <a name="m_clrbackcolor"></a> `CMFCPreviewCtrlImpl::m_clrBackColor`
164165

165166
Background color of the preview window.
166167

167168
### Syntax
168169

169-
```
170+
```cpp
170171
COLORREF m_clrBackColor;
171172
```
172173

173-
## <a name="m_clrtextcolor"></a> CMFCPreviewCtrlImpl::m_clrTextColor
174+
## <a name="m_clrtextcolor"></a> `CMFCPreviewCtrlImpl::m_clrTextColor`
174175

175176
Text color of the preview window.
176177

177178
### Syntax
178179

179-
```
180+
```cpp
180181
COLORREF m_clrTextColor;
181182
```
182183

183-
## <a name="m_font"></a> CMFCPreviewCtrlImpl::m_font Font used to display text in the preview window.
184+
## <a name="m_font"></a> `CMFCPreviewCtrlImpl::m_font`
185+
186+
Font used to display text in the preview window.
184187

185188
### Syntax
186189

187-
```
190+
```cpp
188191
CFont m_font;
189192
```
190193

191-
## <a name="m_pdocument"></a> CMFCPreviewCtrlImpl::m_pDocument
194+
## <a name="m_pdocument"></a> `CMFCPreviewCtrlImpl::m_pDocument`
192195

193196
A pointer to a document whose content is previewed in the control.
194197

195198
### Syntax
196199

197-
```
200+
```cpp
198201
ATL::IDocument* m_pDocument;
199202
```
200203

201-
## <a name="redraw"></a> CMFCPreviewCtrlImpl::Redraw
204+
## <a name="redraw"></a> `CMFCPreviewCtrlImpl::Redraw`
202205

203206
Tells this control to redraw.
204207

205208
### Syntax
206209

207-
```
210+
```cpp
208211
virtual void Redraw();
209212
```
210213

211-
## <a name="setdocument"></a> CMFCPreviewCtrlImpl::SetDocument
214+
## <a name="setdocument"></a> `CMFCPreviewCtrlImpl::SetDocument`
212215

213216
Called by the preview handler to create a relationship between the document implementation and the preview control.
214217

215218
### Syntax
216219

217220
```cpp
218221
void SetDocument(
219-
IDocument* pDocument
222+
IDocument* pDocument
220223
);
221224
```
222225

223226
### Parameters
224227

225-
*pDocument*<br/>
228+
*`pDocument`*\
226229
A pointer to the document implementation.
227230

228-
## <a name="sethost"></a> CMFCPreviewCtrlImpl::SetHost
231+
## <a name="sethost"></a> `CMFCPreviewCtrlImpl::SetHost`
229232

230233
Sets a new parent for this control.
231234

232235
### Syntax
233236

234-
```
237+
```cpp
235238
virtual void SetHost(
236-
HWND hWndParent
239+
HWND hWndParent
237240
);
238241
```
239242

240243
### Parameters
241244

242-
*hWndParent*<br/>
245+
*`hWndParent`*\
243246
A handle to the new parent window.
244247

245-
## <a name="setpreviewvisuals"></a> CMFCPreviewCtrlImpl::SetPreviewVisuals
248+
## <a name="setpreviewvisuals"></a> `CMFCPreviewCtrlImpl::SetPreviewVisuals`
246249

247250
Called by a Rich Preview handler when it needs to set visuals of rich preview content.
248251

249252
### Syntax
250253

251-
```
254+
```cpp
252255
virtual void SetPreviewVisuals(
253-
COLORREF clrBack,
254-
COLORREF clrText,
255-
const LOGFONTW *plf
256+
COLORREF clrBack,
257+
COLORREF clrText,
258+
const LOGFONTW *plf
256259
);
257260
```
258261

259262
### Parameters
260263

261-
*clrBack*<br/>
264+
*`clrBack`*\
262265
Background color of preview window.
263266

264-
*clrText*<br/>
267+
*`clrText`*\
265268
Text color of preview window.
266269

267-
*plf*<br/>
270+
*`plf`*\
268271
Font used to display text in the preview window.
269272

270-
## <a name="setrect"></a> CMFCPreviewCtrlImpl::SetRect
273+
## <a name="setrect"></a> `CMFCPreviewCtrlImpl::SetRect`
271274

272275
Sets a new bounding rectangle for this control.
273276

274277
### Syntax
275278

276-
```
279+
```cpp
277280
virtual void SetRect(
278-
const RECT* prc,
279-
BOOL bRedraw
281+
const RECT* prc,
282+
BOOL bRedraw
280283
);
281284
```
282285

283286
### Parameters
284287

285-
*prc*<br/>
288+
*`prc`*\
286289
Specifies the new size and position of the preview control.
287290

288-
*bRedraw*<br/>
291+
*`bRedraw`*\
289292
Specifies whether the control should be redrawn.
290293

291294
### Remarks
292295

293296
Usually a new bounding rectangle is set when the host control is resized.
294297

295-
## <a name="dtor"></a> CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl
298+
## <a name="dtor"></a> `CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl`
296299

297300
Destructs a preview control object.
298301

299302
### Syntax
300303

301-
```
304+
```cpp
302305
virtual ~CMFCPreviewCtrlImpl();
303306
```

0 commit comments

Comments
 (0)