description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CHwndRenderTarget Class |
CHwndRenderTarget Class |
11/04/2016 |
|
|
aa65b69f-7202-46ea-af81-ef325da0b840 |
A wrapper for ID2D1HwndRenderTarget.
class CHwndRenderTarget : public CRenderTarget;
Name | Description |
---|---|
CHwndRenderTarget::CHwndRenderTarget | Constructs a CHwndRenderTarget object from HWND. |
Name | Description |
---|---|
CHwndRenderTarget::Attach | Attaches existing render target interface to the object |
CHwndRenderTarget::CheckWindowState | Indicates whether the HWND associated with this render target is occluded. |
CHwndRenderTarget::Create | Creates a render target associated with the window |
CHwndRenderTarget::Detach | Detaches render target interface from the object |
CHwndRenderTarget::GetHwnd | Returns the HWND associated with this render target. |
CHwndRenderTarget::GetHwndRenderTarget | Returns ID2D1HwndRenderTarget interface. |
CHwndRenderTarget::ReCreate | Re-creates a render target associated with the window |
CHwndRenderTarget::Resize | Changes the size of the render target to the specified pixel size |
Name | Description |
---|---|
CHwndRenderTarget::operator ID2D1HwndRenderTarget* | Returns ID2D1HwndRenderTarget interface. |
Name | Description |
---|---|
CHwndRenderTarget::m_pHwndRenderTarget | A pointer to an ID2D1HwndRenderTarget object. |
Header: afxrendertarget.h
Attaches existing render target interface to the object
void Attach(ID2D1HwndRenderTarget* pTarget);
pTarget
Existing render target interface. Cannot be NULL
Indicates whether the HWND associated with this render target is occluded.
D2D1_WINDOW_STATE CheckWindowState() const;
A value that indicates whether the HWND associated with this render target is occluded.
Constructs a CHwndRenderTarget object from HWND.
CHwndRenderTarget(HWND hwnd = NULL);
hwnd
The HWND associated with this render target
Creates a render target associated with the window
BOOL Create(HWND hWnd);
hWnd
The HWND associated with this render target
If the method succeeds, it returns TRUE. Otherwise, it returns FALSE
Detaches render target interface from the object
ID2D1HwndRenderTarget* Detach();
Pointer to detached render target interface.
Returns the HWND associated with this render target.
HWND GetHwnd() const;
The HWND associated with this render target.
Returns ID2D1HwndRenderTarget interface.
ID2D1HwndRenderTarget* GetHwndRenderTarget();
Pointer to an ID2D1HwndRenderTarget interface or NULL if object is not initialized yet.
A pointer to an ID2D1HwndRenderTarget object.
ID2D1HwndRenderTarget* m_pHwndRenderTarget;
Returns ID2D1HwndRenderTarget interface.
operator ID2D1HwndRenderTarget*();
Pointer to an ID2D1HwndRenderTarget interface or NULL if object is not initialized yet.
Re-creates a render target associated with the window
BOOL ReCreate(HWND hWnd);
hWnd
The HWND associated with this render target
If the method succeeds, it returns TRUE. Otherwise, it returns FALSE.
Changes the size of the render target to the specified pixel size
BOOL Resize(const CD2DSizeU& size);
size
The new size of the render target in device pixels
If the method succeeds, it returns TRUE. Otherwise, it returns FALSE.