Retrieves the color of the display element specified in the current system configuration. Display elements are all the parts of a window that are displayed on screen.
The value corresponds to a RGB color. Each color has a red, green and blue component in the range [0 ; 255]. The value of the resultant color is calculated as follows: Color = B*65536 + G*256 + R .
Context
Windows client,
Adelia Cloud client.
Parameters
NUM_BIN_4
Index
Index of the element whose color is to be retrieved.
0
Scroll bar gray area
1
Desktop
2
Active window title bar Windows 98/Me, Windows 2000/XP: Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled
3
Inactive window title bar Windows 98/Me, Windows 2000/XP: Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled
4
Menu background
5
Window background
6
Main window
7
Text in menus
8
Text in windows
9
Text in title, size box, and scroll bar arrow box
10
Active window border
11
Inactive window border
12
Background color of main window
13
Item(s) selected in a control (list, tree view...)
14
Text of item(s) selected in a control (list, tree view...)
15
Face color for three-dimensional display elements (push button, check box...) and for dialog box backgrounds
16
Dark shadow for three-dimensional display elements
17
Disabled text. This color is set to 0 if the current display driver does not support a solid gray color
18
Text on push buttons
19
Text in an inactive window's title bar
20
Light shadow for three-dimensional display elements
21
Dark shadow for three-dimensional display elements
22
Light shadow for three-dimensional display elements
23
Tooltip text
24
Tooltip background
26
Windows 98/Me, Windows 2000/XP: Color for a hot-tracked item (e. g. tool which is under the mouse in a toolbar)
27
Windows 98/Me, Windows 2000/XP: Right side color in the color gradient of an active window's title bar
28
Windows 98/Me, Windows 2000/XP: Right side color in the color gradient of an inactive window's title bar
NUM_BIN_4
Color
System color of the element.
NUM_BIN_4
ReturnCode
Return code for the operation:
0 : the operation was successful.
-1 : the operation failed because the Index color was not valid.
Example
/* Retrieving the color of the dialog box background in the Color variable
NUM_BIN_4 Color
NUM_BIN_4 ReturnCode
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxGetSysColor' 15 Color ReturnCode