IDXGISwapChain1::GetBackgroundColor method

Retrieves the background color of the swap chain.


HRESULT GetBackgroundColor(
  DXGI_RGBA *pColor



A pointer to a DXGI_RGBA structure that receives the background color of the swap chain.

Return Value

GetBackgroundColor returns:

  • S_OK if it successfully retrieves the background color.
  • DXGI_ERROR_INVALID_CALL if the pColor parameter is invalid, for example, pColor is NULL.
  • Possibly other error codes that are described in the DXGI_ERROR topic.


Note  The background color that GetBackgroundColor retrieves does not indicate what the screen currently displays. The background color indicates what the screen will display with your next call to the IDXGISwapChain1::Present1 method. The default value of the background color is black with full opacity: 0,0,0,1.


Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header dxgi1_2.h
Library Dxgi.lib

See Also