Retrieves the color for a given portion of a month calendar control.
#Include <GuiMonthCal.au3>
_GUICtrlMonthCalGetColor($h_monthcal, $i_color)
Parameters
$h_monthcal | control id/control hWnd |
$i_color | Value of type int specifying which month calendar color to retrieve. |
Return Value
Array containing the color
Remarks
$i_color this value can be one of the following:$MCSC_BACKGROUND | Retrieve the background color displayed between months. |
$MCSC_MONTHBK | Retrieve the background color displayed within the month. |
$MCSC_TEXT | Retrieve the color used to display text within a month. |
$MCSC_TITLEBK | Retrieve the background color displayed in the calendar's title. |
$MCSC_TITLETEXT | Retrieve the color used to display text within the calendar's title. |
$MCSC_TRAILINGTEXT | Retrieve the color used to display header day and trailing day text. Header and trailing days are the days from the previous and following months that appear on the current month calendar. |
Related
_GUICtrlMonthCalSetColor
Example
#include <GUIConstants.au3>
#include <date.au3>
#include <GuiMonthCal.au3>
opt('MustDeclareVars', 1)
Dim $Date, $i, $a_colors
GUICreate( "Get Color", 210, 190)
$Date = GUICtrlCreateMonthCal (_NowCalcDate(), 10, 10)
GUISetState()
; 1 - COLORREF rgbcolor
; 2 - Hex BGR color
; 3 - Hex RGB color
$a_colors = _GUICtrlMonthCalGetColor ($Date, $MCSC_BACKGROUND)
For $i = 1 To $a_colors[0]
MsgBox(0, "Background color displayed between months.", $a_colors[$i])
Next
$a_colors = _GUICtrlMonthCalGetColor ($Date, $MCSC_MONTHBK)
For $i = 1 To $a_colors[0]
MsgBox(0, "Background color displayed within the month.", $a_colors[$i])
Next
$a_colors = _GUICtrlMonthCalGetColor ($Date, $MCSC_TEXT)
For $i = 1 To $a_colors[0]
MsgBox(0, "Color used to display text within a month.", $a_colors[$i])
Next
$a_colors = _GUICtrlMonthCalGetColor ($Date, $MCSC_TITLEBK)
For $i = 1 To $a_colors[0]
MsgBox(0, "Background color displayed in the calendar's title.", $a_colors[$i])
Next
$a_colors = _GUICtrlMonthCalGetColor ($Date, $MCSC_TITLETEXT)
For $i = 1 To $a_colors[0]
MsgBox(0, "Color used to display text within the calendar's title.", $a_colors[$i])
Next
$a_colors = _GUICtrlMonthCalGetColor ($Date, $MCSC_TRAILINGTEXT)
For $i = 1 To $a_colors[0]
MsgBox(0, "Color used to display header day and trailing day text.", $a_colors[$i])
Next