Modifies the background image of a window and specifies the display mode of this image.

Versions 16 and later

This function is now available for WINDEV applications in Linux.

New in version 16

This function is now available for WINDEV applications in Linux.

This function is now available for WINDEV applications in Linux.

Example

// Modify the background image of "WIN_EditImage"// The new image is "C:\Documents\Bkgd.GIF"// This image will be centered in the windowRes = WinBackgroundImage(WIN_EditImage, "C:\Documents\Bkgd.GIF", imgCentered)

// Modify the background image of "WIN_EditImage"// The new image is "Documents\Bkgd.GIF"// This image will be centered in the windowRes = WinBackgroundImage(WIN_EditImage, "\Documents\Bkgd.GIF", imgCentered)

Name of window to use.If this parameter corresponds to an empty string (""), the current window is used.

<Image name>: Character string

Name and full (or relative) path of the image to display in the window. A UNC path can be used. No image is displayed in the window if this parameter does not correspond to an existing image.

No relative path or UNC path can be used.

<Display>: Constant

Indicates the display mode of the image:

imgNormal

100%: Image displayed at 100% in the top left corner of the window.

imgCentered

Centered: Image centered in the window.

imgStretched

Stretched: Image stretched across the entire surface of the window.

imgTiled

Tiled: Image displayed at 100% and tiled to occupy the entire surface of control (tile).

imgH

Homothetic: Image enlarged or reduced (by respecting the proportions of the initial image) to occupy the entire surface of the window.

imgHE

Homothetic extended: Image enlarged or reduced (by respecting the proportions of the initial image) so that the smaller side of the image is entirely displayed in the window.

imgHC

Homothetic centered: Image enlarged or reduced (by respecting the proportions of the initial image) and centered in the window.

imgHCE

Homothetic centered extended: Image enlarged or reduced (by respecting the proportions of the initial image) so that the smaller side of the image is entirely displayed in the window and centered in the window.

imgHWIS

Homothetic without enlargement: If the image can be entirely displayed in the window, it is displayed at 100%. Otherwise, the image is proportionally reduced in order to be entirely displayed.

imgHCWIS

Homothetic centered without enlargement: If the image can be entirely displayed in the window, it is displayed at 100% and centered in the window. Otherwise, the image is proportionally reduced so that it can be entirely displayed and centered in the window.