CMFCPreviewCtrlImpl Class
This class implements a window that is placed on a host window provided by the Shell for Rich Preview.
class CMFCPreviewCtrlImpl : public CWnd;
Name | Description |
---|---|
CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl | Destructs a preview control object. |
CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl | Constructs a preview control object. |
Name | Description |
---|---|
CMFCPreviewCtrlImpl::Create | Overloaded. Called by a Rich Preview handler to create the Windows window. |
CMFCPreviewCtrlImpl::Destroy | Called by a Rich Preview handler when it needs to destroy this control. |
CMFCPreviewCtrlImpl::Focus | Sets input focus to this control. |
CMFCPreviewCtrlImpl::GetDocument | Returns a document connected to this preview control. |
CMFCPreviewCtrlImpl::Redraw | Tells this control to redraw. |
CMFCPreviewCtrlImpl::SetDocument | Called by the preview handler to create a relationship between the document implementation and the preview control. |
CMFCPreviewCtrlImpl::SetHost | Sets a new parent for this control. |
CMFCPreviewCtrlImpl::SetPreviewVisuals | Called by a Rich Preview handler when it needs to set visuals of rich preview content. |
CMFCPreviewCtrlImpl::SetRect | Sets a new bounding rectangle for this control. |
Name | Description |
---|---|
CMFCPreviewCtrlImpl::DoPaint | Called by the framework to render the preview. |
Name | Description |
---|---|
CMFCPreviewCtrlImpl::m_clrBackColor | Background color of preview window. |
CMFCPreviewCtrlImpl::m_clrTextColor | Text color of preview window. |
CMFCPreviewCtrlImpl::m_font | Font used to display text in the preview window. |
CMFCPreviewCtrlImpl::m_pDocument | A pointer to a document whose content is previewed in the control. |
Header: afxwin.h
Constructs a preview control object.
CMFCPreviewCtrlImpl();
Overloaded. Called by a Rich Preview handler to create the Windows window.
virtual BOOL Create(
HWND hWndParent,
const RECT* prc
);
virtual BOOL Create(
HWND hWndParent,
const RECT* prc,
CCreateContext* pContext
);
hWndParent
A handle to the host window supplied by the Shell for Rich Preview.
prc
Specifies the initial size and position of the window.
pContext
A pointer to a creation context.
TRUE if creation succeeded; otherwise FALSE.
Called by a Rich Preview handler when it needs to destroy this control.
virtual void Destroy();
Called by the framework to render the preview.
virtual void DoPaint(
CPaintDC* pDC
);
pDC
A pointer to a device context for painting.
Sets input focus to this control.
virtual void Focus();
Returns a document connected to this preview control.
ATL::IDocument* GetDocument();
A pointer to a document, whose content is previewed in the control.
Background color of the preview window.
COLORREF m_clrBackColor;
Text color of the preview window.
COLORREF m_clrTextColor;
CFont m_font;
A pointer to a document whose content is previewed in the control.
ATL::IDocument* m_pDocument;
Tells this control to redraw.
virtual void Redraw();
Called by the preview handler to create a relationship between the document implementation and the preview control.
void SetDocument(
IDocument* pDocument
);
pDocument
A pointer to the document implementation.
Sets a new parent for this control.
virtual void SetHost(
HWND hWndParent
);
hWndParent
A handle to the new parent window.
Called by a Rich Preview handler when it needs to set visuals of rich preview content.
virtual void SetPreviewVisuals(
COLORREF clrBack,
COLORREF clrText,
const LOGFONTW *plf
);
clrBack
Background color of preview window.
clrText
Text color of preview window.
plf
Font used to display text in the preview window.
Sets a new bounding rectangle for this control.
virtual void SetRect(
const RECT* prc,
BOOL bRedraw
);
prc
Specifies the new size and position of the preview control.
bRedraw
Specifies whether the control should be redrawn.
Usually a new bounding rectangle is set when the host control is resized.
Destructs a preview control object.
virtual ~CMFCPreviewCtrlImpl();