HeaderPane
Main
Hide
Share Link
Print

RefreshDays

Formats the days shown again, after the information the application uses in the NM_SFTDATE_DAYFORMATTING notification has changed.

C

void WINAPI SftDate_RefreshDays(HWND hwndCtl);

C++

void CSftDate::RefreshDays();
void CSftCalendar::RefreshDays();

Parameters

hwndCtl

The window handle of the month calendar control (SftCalendar), or of the date field control (SftDate) whose dropdown calendar is affected.

Comments

The RefreshDays function discards the formatting of the days shown in a calendar and repaints them, so the control sends the NM_SFTDATE_DAYFORMATTING notification for each day again. An application calls it when the data it uses to format days changes, for example appointments that were added.

For a date field control, RefreshDays refreshes the dropdown calendar if it is open; a calendar formats its days each time the dropdown opens.

Changes of special dates and calendar settings made using the SftDate_xxx functions refresh the days automatically.

Examples

C View entire sample code

    case IDC_CLEARBUTTON:
        for (i = 0; i < CONTROLS; ++i)
            SftDate_SetCalendarClearButton(c[i], fChecked);
        break;
    case IDC_HOLIDAYS:
        SetHolidays(c, fChecked);
        break;
    case IDC_WEEKENDS:
        // NM_SFTDATE_DAYFORMATTING colors the days; RefreshDays asks for them again
        for (i = 0; i < CONTROLS; ++i)
            SftDate_RefreshDays(c[i]);
        break;
    case IDC_DISABLEWEEKENDS:
        for (i = 0; i < CONTROLS; ++i)
            SftDate_SetDisabledDaysOfWeek(c[i], fChecked ? SFTDATE_DAYS_WEEKEND : SFTDATE_DAYS_NONE);
        break;

C++ View entire sample code

    case IDC_CLEARBUTTON:
        for (int i = 0; i < CONTROLS; ++i)
            Control(i).SetCalendarClearButton(fChecked);
        break;
    case IDC_HOLIDAYS:
        SetHolidays(fChecked);
        break;
    case IDC_WEEKENDS:
        // NM_SFTDATE_DAYFORMATTING colors the days; RefreshDays asks for them again
        for (int i = 0; i < CONTROLS; ++i)
            Control(i).RefreshDays();
        break;
    case IDC_DISABLEWEEKENDS:
        for (int i = 0; i < CONTROLS; ++i)
            Control(i).SetDisabledDaysOfWeek(fChecked ? SFTDATE_DAYS_WEEKEND : SFTDATE_DAYS_NONE);
        break;

See Also C/C++ API | Categories | Notifications


Last Updated 11/26/2026 - (email)
© 2026 Softel vdm, Inc.