Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves the underlying HWND for this swap-chain object.
Syntax
HRESULT GetHwnd(
[out] HWND *pHwnd
);
Parameters
[out] pHwnd
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
Requirement | Value |
---|---|
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] |
Target Platform | Windows |
Header | dxgi1_2.h |
Library | Dxgi.lib |