CMonthCalCtrl::SetCalendarBorder
设置当前month calendar控件的边框的宽度。
void SetCalendarBorder(
int cxyBorder
);
参数
Parameter |
说明 |
---|---|
[in] cxyBorder |
边框的宽度,以像素为单位。 |
备注
如果此方法成功,边框宽度设置为 cxyBorder 参数。 否则,边框宽度将重置为由当前 主题指定的默认值,或零;如果没有使用主题。
此方法发送 MCM_SETCALENDARBORDER 信息,在 Windows SDK所述。
要求
标头: afxdtctl.h
此控件在 Windows Vista 和更高版本支持。
此方法的其他要求。Windows vista公共控件的生成要求所述。
示例
下面的代码示例定义任何变量,m_monthCalCtrl,用于以编程方式访问month calendar控件。 此变量在下一个示例。
// Variable used to reference the month calendar control.
CMonthCalCtrl m_monthCalCtrl;
// Variable used to reference the splitbutton control.
CSplitButton m_splitButton;
下面的代码示例设置month calendar控件的边框宽度设置为八个像素。 使用 CMonthCalCtrl::GetCalendarBorder 方法确定此方法是否成功。
// Use the GetCalendarBorder() method to determine whether
// this method succeeded or failed.
m_monthCalCtrl.SetCalendarBorder( 8 );