IDesktopWallpaper::SetPosition method (shobjidl_core.h)

Sets the display option for the desktop wallpaper image, determining whether the image should be centered, tiled, or stretched.

Syntax

HRESULT SetPosition(
  [in] DESKTOP_WALLPAPER_POSITION position
);

Parameters

[in] position

One of the DESKTOP_WALLPAPER_POSITION enumeration values that specify how the image will be displayed on the system's monitors.

Return value

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

Return code Description
S_FALSE
The desktop wallpaper is already displayed as asked for in position.

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::GetPosition