wpSetLockupBackground
Appearance
This method is specific to Version 4, or higher, of the OS/2 operating system.
This instance method sets the current values for the lockup background.
Syntax
wpSetLockupBackground(somSelf, pszImageFileName,
ulImageMode, ulScaleFactor, ulBackgroundType,
lBackgroundColor)
Parameters
- somSelf (WPDesktop *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPDesktop.
- pszImageFileName (PSZ) - input
- The name of the background image file (or **NULL** if none is defined).
- ulImageMode (ULONG) - input
- The following are the image modes:
- **BACKGROUND_NORMAL_IMAGE** Normal image.
- **BACKGROUND_TILED_IMAGE** Tiled image.
- **BACKGROUND_SCALED_IMAGE** Scaled image.
- ulScaleFactor (ULONG) - input
- Scaling factor if the image mode is **SCALED_IMAGE**.
- ulBackgroundType (ULONG) - input
- Can be one of the following background types:
- **BACKGROUND_COLOR_ONLY** Color only, no image.
- **BACKGROUND_IMAGE** Type of image (see image modes).
- lBackgroundColor (LONG) - input
- Background color as an encoded **RGB** value.
- 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 lockup background for the current desktop.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPDesktop *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 following are the image modes. */
ULONG ulScaleFactor; /* Scaling factor if the image mode is SCALED_IMAGE. */
ULONG ulBackgroundType; /* Can be one of the following background types. */
LONG lBackgroundColor; /* Background color as an encoded RGB value. */
wpSetLockupBackground(somSelf, pszImageFileName,
ulImageMode, ulScaleFactor, ulBackgroundType,
lBackgroundColor);
/* Example code provided in the source: */
WPDesktop *Desktop;
Desktop = _wpclsQueryObjectFromPath("<WP_DESKTOP>");
_wpSetLockupBackground(Desktop,
"?:\\os2\\bitmap\\warplogo.png",
BACKGROUND_TILED_IMAGE,
1,
BACKGROUND_IMAGE,
CYAN);