Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling MCN_GETDAYSTATE from month calendar
Message
From
06/06/2008 22:01:32
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01321939
Message ID:
01322248
Views:
22
>>>
>>>I would store AnuallyBoldedDates and MonthlyBoldedDates as an array/collection and also MONTHDAYSTATE values using _Access/_Assign. This way you'll have only build MONTHDAYSTATE when values change which happen less often compare to the number of calls to bold dates.
>>>I'm not sure if you can optimize storage of BoldedDates.
>>>
>>>
>>Sergey:
>>
>>Thank you for your suggestions. I managed it with arrays for AnuallyBoldedDates, MonthlyBoldedDates, and BoldedDates.
>>
>>The MONTHDAYSTATE 'array' has to be rebuilt from scratch every time you get the getdaystate message, since the change in months displayed could be by one month, or ten years.
>>
>>So the only solution I came up with is to build the MONTHDAYSTATE 'array' one day at a time: iterate through each element of the AnuallyBoldedDates array to find a match for day/month, then iterate through each element of MonthlyBoldedDates to find a match for day, and then do an ASCAN for the date in BoldedDates.
>>
>
>Hi Carlos,
>
>I guess, I didn't explain well what I meant. Yes, the MONTHDAYSTATE 'array' has to be rebuild every time but it doesn't mean that you have to reprocess AnuallyBoldedDates and MonthlyBoldedDates every time date by date. You can keep an array of 12 integers for AnuallyBoldedDates and one integer for MonthlyBoldedDates and populate them only once when related array changes. When it's time to rebuild the MONTHDAYSTATE 'array' you'll combine appropriate integers for AnuallyBoldedDates, MonthlyBoldedDates and than set BoldedDates on top of it.

Now I get it! THANK YOU!

Carlos
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform