Restored from previous forum. Originally posted by freak.
> And I have a question:
> Is there any way to change the calendar colors?
Yes, nearly everything can be done in some way...
Here we go:
Code: Select all
SendMessage_(hCal, #MCM_SETCOLOR, #MCSC_BACKGROUND, $000000)
This sets the backgroundcolor to black.
The $000000 can be relpaced with any RGB value you like (just like the HTML colors)
#MCSC_BACKGROUND can be replaced with the following constants:
#MCSC_BACKGROUND
Set the background color displayed between months.
#MCSC_MONTHBK
Set the background color displayed within the month.
#MCSC_TEXT
Set the color used to display text within a month.
#MCSC_TITLEBK
Set the background color displayed in the calendar's title.
#MCSC_TITLETEXT
Set the color used to display text within the calendar's title.
#MCSC_TRAILINGTEXT
Set 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.
Code: Select all
;Constant definition:
#MCM_SETCOLOR = $100A ; wrong value last time, sorry.
#MCSC_BACKGROUND = 0
#MCSC_TEXT = 1
#MCSC_TITLEBK = 2
#MCSC_TITLETEXT = 3
#MCSC_MONTHBK = 4
#MCSC_TRAILINGTEXT= 5
You can change this stuff anywhere after the CreateWindowEx_() command.
That's it...
Timo
--------------------------------
Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs and the universe trying to produce bigger and better idiots.
...So far, the universe is winning.