Please enable JavaScript to view this site.

A-Shell Development History

ASHMONTHCAL control enhancement: you can now set various color attributes for the control. To begin, you must first create the control with the MBF2_NOTHEME bit set; otherwise, colors are controlled by the Windows theme. Then, after creating the control, set individual color attributes using the same general technique as for setting date range and day states, i.e. via a control string sent in the ctext$ parameter with the cstate parameter set to MBST_TEXTONLY:

xcall AUI, AUI_CONTROL, CTLOP_CHG, ctlid, ctext$, MBST_TEXTONLY

where ctext$ should set to the an attribute name string followed by a colon followed by hex representation for the blue, green and red color values, e.g.

AttributeID:&hbbggrr

The available attributes (not case sensitive) for which colors can be set are as follows:

AttributeID

Description

SETCOLOR_BACKGROUND

Background (area outside the calendars but inside the control borders)

SETCOLOR_MONTHBK

Background for the calendar(s)

SETCOLOR_TEXT

Color of the text within a month (days)

SETCOLOR_TITLEBK

Background of the title area

SETCOLOR_TITLETEXT

Title text color

SETCOLOR_HDRTRAILINGTEXT

Text color for the display header day and trailing day text (leading and trailing days from previous and following months)

Example

ctext$ = "SETCOLOR_MONTHBK:&heecc88"

xcall AUI, AUI_CONTROL, CTLOP_CHG, ctlid, ctext$, MBST_TEXTONLY