Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDXGISwapChain1::GetHwnd method

Retrieves the underlying HWND for this swap-chain object.

Syntax


HRESULT GetHwnd(
  [out] HWND *pHwnd
);

Parameters

pHwnd [out]

A pointer to a variable that receives the HWND for the swap-chain object.

Return value

Returns S_OK if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

If pHwnd receives NULL (that is, the swap chain is not HWND-based), GetHwnd returns DXGI_ERROR_INVALID_CALL.

Remarks

Applications call the IDXGIFactory2::CreateSwapChainForHwnd method to create a swap chain that is associated with an HWND.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps only]

Header

DXGI1_2.h

Library

Dxgi.lib

See also

IDXGISwapChain1

 

 

Show:
© 2017 Microsoft