Admin Production ni-theme
Current Publication

GetWallpaper

LabWindows/CVI

GetWallpaper

int GetWallpaper (int *tiled, char bitmapFile[]);

Purpose

This function gets the current Windows desktop wallpaper. This is useful if your application is going to change the wallpaper, as it must be able to restore the original settings when it completes.

(Linux) This function is not supported.

Parameters

Output
Name Type Description
tiled int Returns a Boolean indicating whether the walpaper is tiled. If this value is 0, then the wallpaper is centered on the desktop.
bitmapFile char [] A buffer into which the function will copy the full NULL–terminated pathname of the desktop wallpaper file (a bitmap). This buffer must be at least MAX_PATHNAME_LEN bytes. If no wallpaper is currently configured, the function will return an empty string.
Note Note  MAX_PATHNAME_LEN is only reliable for ANSI single byte strings. For UTF-8 strings, call the IsUTF8PathLengthValid function to confirm that the file path is within the operating system character limit.

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