IDesktopWallpaper::GetBackgroundColor method (shobjidl_core.h)

Retrieves the color that is visible on the desktop when no image is displayed or when the desktop background has been disabled. This color is also used as a border when the desktop wallpaper does not fill the entire screen.

Syntax

HRESULT GetBackgroundColor(
  [out] COLORREF *color
);

Parameters

[out] color

A pointer to a COLORREF value that, when this method returns successfully, receives the RGB color value. If this method fails, this value is set to 0.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)

See also

IDesktopWallpaper

IDesktopWallpaper::SetBackgroundColor