home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
win_lrn
/
time
/
getctime.c
next >
Wrap
C/C++ Source or Header
|
1988-08-10
|
689b
|
32 lines
/*
*
* GetCurrentTime
*
* This program demonstrates the use of the function GetCurrentTime.
* This function retrieves the current Window time.
*
*
*/
#include <windows.h>
int PASCAL WinMain( hInstance, hPrevInstance, lpszCmdLine, cmdShow )
HANDLE hInstance, hPrevInstance;
LPSTR lpszCmdLine;
int cmdShow;
{
DWORD dwCurTime;
char szbuff[80];
MessageBox (NULL, (LPSTR)"Getting current time", (LPSTR)"GetCurrentTime",
MB_OK);
dwCurTime = GetCurrentTime ();
sprintf ( szbuff, "The current time in milliseconds is %ld",
dwCurTime );
MessageBox (NULL, (LPSTR) szbuff, (LPSTR)"GetCurrentTime", MB_OK);
return FALSE;
}