64,281
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <windows.h>
#include<iostream>
using std::cout;
using std::endl;
#define myID 1000
void CALLBACK myfun(HWND, UINT,UINT_PTR nEventID,DWORD)
{
if(nEventID==myID)
cout<<"nihao"<<endl;
}
int main()
{
char c;
c=getchar();
if(c=='a')
{
::SetTimer(NULL,myID,2000,myfun);
}
c=getchar();
return 0;
}