VC6.0 Win32 数字时钟

时间:2014-01-03 07:54:20
【文件属性】:

文件名称:VC6.0 Win32 数字时钟

文件大小:12KB

文件格式:ZIP

更新时间:2014-01-03 07:54:20

数字时钟

VC6.0下通过,基于SDK的数字时钟int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; LoadString(hInstance, IDC_CLOCK, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); int nCmdLine = strlen(lpCmdLine); if( nCmdLine>3 ) { char* pSepar = strstr(lpCmdLine, ":"); if( pSepar ) { int result = pSepar - lpCmdLine; if( result<=2 ) { char sTm[5]; strncpy(sTm, lpCmdLine, result); m_nAlarmHour = atoi( sTm ); if( m_nAlarmHour==0 ) m_nAlarmHour = 24; strncpy(sTm, lpCmdLine+result+1, nCmdLine-result-1); m_nAlarmMin = atoi( sTm ); } } } if( !InitInstance (hInstance, nCmdShow) ) return FALSE; while( GetMessage(&msg, NULL, 0, 0) ) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; }


【文件预览】:
ClockSource
----Clock.rc(3KB)
----Clock.h(323B)
----StdAfx.cpp(292B)
----resource.h(946B)
----Clock.cpp(21KB)
----Clock.dsp(4KB)
----ReadMe.txt(2KB)
----StdAfx.h(909B)
----res()
--------image.bmp(6KB)
----Clock.dsw(533B)
----Clock.ICO(1KB)

网友评论

  • 写的有的简单 不过还是挺不错的 谢谢分享。