下面是用C语言编写的在DOS C下能运行的秒表程序,请问高手怎样把它转化为简单的Windows C程序?急!急
#include <stdio.h>
#include <time.h>
#include <dos.h>
struct time tim;
int h0,m0,s0,h1,m1,s1,h2,m2,s2;
main()
{ char ch=0;
clrscr();
printf("Press any key to start time!");
getch();
gettime(&tim);
h0=tim.ti_hour;
m0=tim.ti_min;
s0=tim.ti_sec;
h1=m1=s1=0;
gotoxy(70,1);
printf("%2d:%2d:%2d\n",h1,m1,s1);
printf("Esc key by the end of time!");
while (ch!=27)
{ while(!bioskey(1))
{ gettime(&tim);
if (s2==tim.ti_sec) continue;
h2=tim.ti_hour;
m2=tim.ti_min;
s2=tim.ti_sec;
s1=s2-s0;
if (s1<0) { s1+=60;m2--;}
m1=m2-m0;
if (m1<0) { m1+=60;h2--;}
h1=h2-h0;
if (h1<0) h1=0;
gotoxy(70,1);
printf("%2d:%2d:%2d\n",h1,m1,s1);
gotoxy(20,2);
}
ch=bioskey(0);
}
}