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.
Get the output (the display monitor) that contains the majority of the client area of the target window.
Syntax
HRESULT GetContainingOutput(
[out] IDXGIOutput **ppOutput
);
Parameters
[out] ppOutput
Type: IDXGIOutput**
A pointer to the output interface (see IDXGIOutput).
Return value
Type: HRESULT
Returns one of the following DXGI_ERROR.
Remarks
If the method succeeds, the output interface will be filled and its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.
The output is also owned by the adapter on which the swap chain's device was created.
You cannot call GetContainingOutput on a swap chain that you created with IDXGIFactory2::CreateSwapChainForComposition.
To determine the output corresponding to such a swap chain, you should call IDXGIFactory::EnumAdapters and then IDXGIAdapter::EnumOutputs to enumerate over all of the available outputs. You should then intersect the bounds of your CoreWindow::Bounds with the desktop coordinates of each output, as reported by DXGI_OUTPUT_DESC1::DesktopCoordinates or DXGI_OUTPUT_DESC::DesktopCoordinates.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | dxgi.h |
Library | DXGI.lib |