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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft