Get Default System Colors - SENDMSG Function 1
Syntax
COLOR_LIST$=SENDMSG(sysgui,-1,1,0,colors$)
Description
This function returns the default colors as 3-byte RGB values in the same byte order specified in the colors$ parameter. For example, a colors$ value of $0401$ retrieves the system colors for LIGHT3D and DKSHADOW3D, in that order.
Parameter |
Description |
---|---|
sysgui |
Valid SYSGUI channel. |
id |
Child window ID, or if 0 is used, the current window. |
1 |
SENDMSG function number. |
0 |
Always 0. |
colors$ |
String value, according to the following table. |
Window Mnemonic Name(s) |
Index |
Description |
DKSHADOW3D |
$01$ |
Displays a dark shadow (on three-dimensional elements only). |
FACE3D |
$02$ |
Displays the face color (on three-dimensional elements only). |
HILIGHT3D |
$03$ |
Displays the highlight color on the edges facing towards the light source (on three-dimensional elements only). |
LIGHT3D |
$04$ |
Displays the shadow color on the edges facing towards the light source (on three-dimensional elements only). |
SHADOW3D |
$05$ |
Displays the shadow color on those edges facing away from the light source (on three-dimensional elements only). |
ACTIVEBORDER |
$06$ |
Sets the active window border color. |
ACTIVECAPTION |
$07$ |
Sets the active window caption color. |
APPWORKSPACE |
$08$ |
Sets the background color of multiple document interface (MDI) applications. |
BACKGROUND |
$09$ |
Sets the desktop color. |
BTNTEXT |
$0A$ |
Sets the button text color. |
CAPTIONTEXT |
$0B$ |
Sets the caption, size box, and scroll bar arrow boxes text colors. |
GRAYTEXT |
$0C$ |
Sets the color of grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color. |
HIGHLIGHT |
$0D$ |
Sets the color of items selected in a control. |
HIGHLIGHTEXT |
$0E$ |
Sets the text color of items selected in a control. |
INACTIVEBORDER |
$0F$ |
Sets the inactive window border color. |
INACTIVECAPTION |
$10$ |
Sets the inactive window caption color. |
INACTIVECAPTIONTEXT |
$11$ |
Sets the inactive caption text color. |
INFOBK |
$12$ |
Sets the tool tip control background color. |
INFOTEXT |
$13$ |
Sets the tool tip control text color. |
MENU |
$14$ |
Sets the background color. |
MENUTEXT |
$15$ |
Sets the menu text color. |
SCROLLBAR |
$16$ |
Sets the scroll bar gray area color. |
WINDOW |
$17$ |
Sets the window background color. |
WINDOWFRAME |
$18$ |
Sets the window frame color. |
WINDOWTEXT |
$19$ |
Sets the window text color. |
If colors$ contains a byte value that does not correspond to an item in the list, SENDMSG() generates an !ERROR=17.
Example
The following retrieves the button face system color red, green, and blue values in a format for use with the 'COLOR' mnemonic:
btnface$=sendmsg(sysgui,-1,1,1,$02$)
red=asc(btnface$)
green=asc(btnface$(2))
blue=asc(btnface$(3))