随笔 - 92  文章 - 0  评论 - 13  阅读 - 17万

随笔分类 -  [VC++]定时器/时间

[VC++]VC中如何获得当前系统时间
摘要://方案— 优点:仅使用C标准库;缺点:只能精确到秒级 #include #include int main( void ) { time_t t = time( 0 ); char tmp[64]; strftime( tmp, sizeof(tmp), "%Y/%m/%d %X %A 本年第%j天 %z", localtime(&t) ); ... 阅读全文
posted @ 2008-11-20 17:00 BoneKing 阅读(1486) 评论(0) 推荐(0) 编辑
[VC++]轻松搞VC之定时器(Timer)
摘要:方法如下: 1在WorkSpace里选择"class view",右击 *DLG,在菜单中选择"Add Windows Messge Handler" 2在弹出的对话框的左方找到 WM_TIMER 双击 加入到右上方的列表中 3双击右上方列表中的WM_TIMER 加入自己的处理代码 4在需要使用Timer的地方加入 SetTimer(1,1000,NULL)5用KillTimer()在不需要的地方... 阅读全文
posted @ 2008-11-20 16:59 BoneKing 阅读(4077) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示