HeaderPane
Main
Hide
Share Link
Print

BorderStyle

Defines the border of a date field control.

C

int WINAPI SftDate_GetBorderStyle(HWND hwndCtl);
BOOL WINAPI SftDate_SetBorderStyle(HWND hwndCtl, int style);

C++

int CSftDate::GetBorderStyle() const;
BOOL CSftDate::SetBorderStyle(int style);

Parameters

hwndCtl

The window handle of the date field control (SftDate).

style

The border. style can be one of the following values:

SFTDATE_BORDER_NONENo border.
SFTDATE_BORDER_FIXEDSINGLEA thin line in the color SFTDATE_COLOR_FIELDBORDER (SetColor). This is the default.
SFTDATE_BORDER_FIXED3DThe border of an edit control, drawn using the current theme (SetUseThemes).

Returns

GetBorderStyle returns the border, one of the values listed above.

SetBorderStyle returns TRUE if the value is valid, otherwise FALSE.

Comments

The GetBorderStyle and SetBorderStyle functions define and retrieve the border a date field control draws. The border changes the preferred height of the field (GetPreferredHeight).

The border of a month calendar control is defined using the WS_BORDER window style. This function applies to the date field control only. For a month calendar control, GetBorderStyle returns SFTDATE_BORDER_FIXEDSINGLE and SetBorderStyle has no effect and returns FALSE.

Examples

C View entire sample code

            SftDate_SetHighContrastMode(c[i], sel);
        break;
    case IDC_BUTTONS:
        for (i = 0; i < FIELDS; ++i)
            SftDate_SetButtons(c[i], sel);
        break;
    case IDC_BORDER:
        for (i = 0; i < FIELDS; ++i)
            SftDate_SetBorderStyle(c[i], g_borderStyles[sel]);
        break;
    case IDC_ALIGNMENT:
        for (i = 0; i < FIELDS; ++i)
            SftDate_SetDropDownAlignment(c[i], sel);
        break;
    case IDC_ACROSS:
        SftDate_SetMonthsAcross(hwndCal, sel + 1);

C++ View entire sample code

            Control(i).SetHighContrastMode(sel);
        break;
    case IDC_BUTTONS:
        for (int i = 0; i < FIELDS; ++i)
            m_Fields[i].SetButtons(sel);
        break;
    case IDC_BORDER:
        for (int i = 0; i < FIELDS; ++i)
            m_Fields[i].SetBorderStyle(g_borderStyles[sel]);
        break;
    case IDC_ALIGNMENT:
        for (int i = 0; i < FIELDS; ++i)
            m_Fields[i].SetDropDownAlignment(sel);
        break;
    case IDC_ACROSS:
        m_Calendar.SetMonthsAcross(sel + 1);

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


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