Admin Production ni-theme
Current Publication

SetWallpaper

LabWindows/CVI

SetWallpaper

int SetWallpaper (int displayStyle, const char bitmapFile[]);

Purpose

This function sets the current Windows desktop wallpaper.

(Linux) This function is not supported.

Parameters

Input
Name Type Description
displayStyle int The orientation of the bitmap on the desktop window.

Specify a nonzero value or select Tiled to display the bitmap in a tiled pattern.

Specify 0 or select Centered in the function panel to center the bitmap.
bitmapFile const char[] The pathname of the bitmap (*.BMP) file to set as the Windows desktop wallpaper. If you do not want any wallpaper, pass an empty string.

Example:

"C:\\WinNT\\winnt.bmp" or ""

Return Value

Name Type Description
status int The status code that the function returns.

0 indicates success.

A negative value indicates an error.

This function may return a Programmer's Toolbox or UI Library error code. Call GetGeneralErrorString to obtain a text description of the error.

Additional Information

Library: Programmer's Toolbox

Include file: toolbox\toolbox.h

LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later