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 code | Description |
|---|---|
|
The desktop wallpaper is already in the state you're asking for through this call. |
|
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.
Requirements
|
Minimum supported client |
Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps only] |
|
Header |
|
|
IDL |
|
See also