DspSetCurColor
- Last UpdatedJul 18, 2023
- 1 minute read
Sets the color of the focus rectangle. The focus rectangle is used to highlight a selectable object, tab or list item as the mouse moves over it.
Syntax
DspSetCurColor(INT Color)
Color:
An integer representing the color to use for the focus rectangle. The default value is white (0x00FFFFFF).
There are a set of labels available in the Include project that you can use:
BLACK — 0x00000000
BLUE — 0x00000080
GREEN — 0x00008000
CYAN — 0x00008080
RED — 0x00800000
MAGENTA — 0x00800080
BROWN — 0x00808000
GREY — 0x00BFBFBF
DARK_GREY — 0x007F7F7F
LIGHT_BLUE — 0x000000FF
LIGHT_GREEN — 0x0000FF00
LIGHT_CYAN — 0x0000FFFF
LIGHT_RED — 0x00FF0000
LIGHT_MAGENTA — 0x00FF00FF
YELLOW — 0x00FFFF00
WHITE — 0x00FFFFFF
TRANSPARENT - 0xFF000000
Note: If your project is based on the Situational Awareness Starter Project, this value will be overwritten by the color theme setting specified for the project.
Return Value
The previous focus rectangle color as an integer.
Example
DspSetCurColor(WHITE); // The focus rectangle will be white (the default)
DspSetCurColor(MakeCitectColour(221, 221, 221)); // The focus rectangle will be
grey
DspSetCurColor(MakeCitectColour(255, 0, 0); // The focus rectangle will be
red
DspSetCurColor(MakeCitectColour(0, 255, 0); // The focus rectangle will be
green
DspSetCurColor(MakeCitectColour(0, 0, 255); // The focus rectangle will be
blue