mfc 单文档显示当前系统时间
来源:互联网 发布:浙江濮院淘宝供货地 编辑:程序博客网 时间:2024/05/22 11:35
1、在mainfrm类向导添加计时器,
2、OnCreate
3、实现
CTime time;
time=CTime::GetCurrentTime();//得到当前时间
CString s=time.Format(" %Y-%m-%d %H:%M:%S ");//转换时间格式
//CString s=time.Format("%H:%M:%S");//转换时间格式
//m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(ID_STATUSBAR_PANE2),s); //显示时钟
// m_wndStatusBar.AddExtendedElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE2, s, FALSE), s);
CMFCRibbonBaseElement * p = m_wndStatusBar.GetExElement(0);
if (p != NULL)
{
p->SetText(s);
}
m_wndStatusBar.Invalidate (TRUE);
CFrameWndEx::OnTimer(nIDEvent);
1 0
- mfc 单文档显示当前系统时间
- MFC 对话框中显示系统当前时间
- VS2010用MFC显示系统当前时间
- VS2010用MFC显示系统当前时间
- MFC 对话框中显示系统当前时间
- MFC 单文档应用程序如何在状态栏显示时间
- 显示当前系统时间
- MFC 单文档 显示图片
- MFC 显示系统时间
- MFC获取系统当前时间
- MFC获取系统当前时间
- MFC获取系统当前时间
- MFC获取当前系统时间
- MFC获取系统当前时间
- MFC获取系统当前时间
- 【MFC】获取系统当前时间
- 【MFC】MFC获取系统当前时间
- javascript 显示当前系统时间
- Show me the code之Python练习册 Q10 生成验证码
- Oracle 数据泵详解
- Action配置
- 顺序串的实现(插入、截取、匹配)
- PHP原生态记录Log函数
- mfc 单文档显示当前系统时间
- 分数修改
- 使用afinal框架实现简单的下载
- 八皇后问题
- 学习YAML
- JavaScript 中判断对象的类型
- Show me the code之Python练习册 Q11~12 关键词过滤
- SQL的插入语句insert
- AS主题+配置备份+Logcat颜色配置