Jump to content

wpQueryIconTextColor

From EDM2

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

This instance method returns the current color being used for the icon text in the specified view.

Syntax

_wpQueryIconTextColor(somSelf, ulView)

Parameters

somSelf (WPFolder *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPFolder.
ulView (ULONG) - input
Specifies which view to query.
  • **OPEN_CONTENTS** Open contents view.
  • **OPEN_DEFAULT** Open default view (same as double-click).
  • **OPEN_DETAILS** Open details view.
  • **OPEN_HELP** Display HelpPanel.
  • **OPEN_RUNNING** Execute object.
  • **OPEN_SETTINGS** Open Settings notebook.
  • **OPEN_TREE** Open tree view.
  • **OPEN_USER** Class-specific views have a greater value than this.

Returns

rc (ULONG) - returns
The **RGB** color value of the current color being used for the icon text.
The RGB value is 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).

How to Override

This method is generally not overridden.

Usage

This method can be called at any time in order to determine the color used to display the title of a normal icon in a view of the folder.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPFolder *somSelf; /* Pointer to the object on which the method is being invoked. */
ULONG ulView; /* Specifies which view to query. */
ULONG rc; /* The RGB color value of the current color being used for the icon text background. */

rc = _wpQueryIconTextColor(somSelf, ulView);

/* Example code provided in the source: */
  ULONG ulTextColor;

  ulTextColor = _wpQueryIconTextColor(somSelf,OPEN_CONTENTS);
  /* ulBackgroundColor is an encoded RGB color value */

Related Methods