Jump to content

WpSetFldrBackground: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:wpSetFldrBackground}} This method is specific to Version 4, or higher, of the OS/2 operating system. This instance method sets the values for the folder background. ==Syntax== wpSetFldrBackground(somSelf, pszImageFileName, ulImageMode, ulScaleFactor, ulBackgroundType, lBackgroundColor) ==Parameters== ;''somSelf'' (WPFolder *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPFolder. ;''pszImag..."
 
(No difference)

Latest revision as of 22:13, 24 November 2025

This method is specific to Version 4, or higher, of the OS/2 operating system.

This instance method sets the values for the folder background.

Syntax

wpSetFldrBackground(somSelf, pszImageFileName, ulImageMode, ulScaleFactor, ulBackgroundType, lBackgroundColor)

Parameters

somSelf (WPFolder *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPFolder.
pszImageFileName (PSZ) - output
The name of the background image file (or **NULL** if none is defined).
ulImageMode (ULONG) - output
The image mode.
  • BACKGROUND_NORMAL_IMAGE Normal image.
  • BACKGROUND_TILED_IMAGE Tiled image.
  • BACKGROUND_SCALED_IMAGE Scaled image.
ulScaleFactor (ULONG) - output
The scaling factor for scaled image mode.
ulBackgroundType (ULONG) - output
The background type.
  • BACKGROUND_COLOR_ONLY The background is color only (no image).
  • BACKGROUND_IMAGE The background is an image.
lBackgroundColor (LONG) - output
The RGB value of the background color or **USE_GLOBAL_COLOR**.
The RGB value must be presented as a 6-digit hex value in the format **0xRRGGBB** where **RR**, **GG**, and **BB** are the red, green, and blue values ranging between 0x00 and 0xFF (0-255).

Returns

rc (none) - returns
There is no return value for this method.

How to Override

This method is generally not overridden.

Usage

This method can be called at any time in order to set the background for a folder.

Remarks

This method is not covered in the provided text.

Example Code

Definition:

#define INCL_WINWORKPLACE
#include <os2.h>

WPFolder     *somSelf;           /*  Pointer to the object on which the method is being invoked. */
PSZ           pszImageFileName;  /*  The name of the background image file (or NULL if none is defined). */
ULONG         ulImageMode;       /*  The image mode. */
ULONG         ulScaleFactor;     /*  The scaling factor for scaled image mode. */
ULONG         ulBackgroundType;  /*  The background type. */
LONG          lBackgroundColor;  /*  The RGB value of the background color or USE_GLOBAL_COLOR. */

wpSetFldrBackground(somSelf, pszImageFileName,
       ulImageMode, ulScaleFactor, ulBackgroundType,
       lBackgroundColor);

This exmaple sets the background for the current folder to WARPLOGO.BMP in the OS2\BITMAP directory on the boot drive as a tiled image.

  _wpSetFldrBackground(somSelf,
                       "?:\\os2\\bitmap\\warplogo.bmp",
                       BACKGROUND_TILED_IMAGE,
                       1,
                       BACKGROUND_IMAGE,
                       CYAN);

Related Methods