IDesktopWallpaper::Enable method

Enables or disables the desktop background.

Syntax


HRESULT Enable(
  [in]  BOOL enable
);

Parameters

enable [in]

TRUE to enable the desktop background, FALSE to disable it.

Return value

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

Return codeDescription
S_FALSE

The desktop wallpaper is already in the state you're asking for through this call.

E_FILE_NOT_FOUND

The desktop wallpaper that would be used when the background is enabled is missing from its expected location. Call SetWallpaper to specify a new wallpaper.

 

Remarks

This method would normally be called to disable the desktop background for performance reasons.

When the desktop background is disabled, a solid color is shown in its place. To get or set the specific color, use the GetBackgroundColor and SetBackgroundColor methods.

Note  A call to the IDesktopWallpaper_SetWallpaper or IDesktopWallpaper_SetSlideshow methods will enable the desktop background even if it is currently disabled through this method.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IDesktopWallpaper

 

 

Community Additions

ADD
Show:
© 2014 Microsoft