//方式一
#include <iostream>
#include <Windows.h>using namespace std;
void CALLBACK TimeProc(HWND hwnd,UINT message,UINT idTimer,DWORD dwTime);
int main(int argc, char * argv[])
{
SetTimer(NULL,1,1000,TimeProc);
MSG msg;
while (GetMessage(
//方式一
#include <iostream>
#include <Windows.h>