I wish to make a routine that I can select the holidays of the month. To the MonthCalendar it has to be Multiselectable. That is, enabling change the background color of each day of the month with a particular color giving the look of being holiday.
Has anyone gone through this before? Any suggestions how to do the routine identification of holidays?
I know that saving in a database always be obtaining the holidays, but do not know how to display the MonthCalendar with possible days marked in another color.
I think first, we hit a MonthCalendar to allow the MCS_MULTISELECT and so surely I'll need a little help from friend Claudio.
I found this on the internet, which can give us an idea:
Code: Select all
#MCS_MULTISELECT=$2
#MCS_DAYSTATE=$1
If OpenWindow(0, 0, 0, 220, 200, "CalendarGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateGadgetList(WindowID(0))
cal=CreateWindowEx_(0,"SysMonthCal32","",#WS_BORDER|#WS_CHILD | #WS_VISIBLE | #MCS_MULTISELECT,10,10,200,180, WindowID(0),10,GetModuleHandle_(0),0)
Debug GetDlgCtrlID_(cal)
SendMessage_(cal, #MCM_SETMAXSELCOUNT, 31,0)
Repeat: Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
EndIf