[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) 编辑
[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) 编辑