草庐IT

DownloadSpeedCounter

全部标签

c++ - WinApi SetTimer 无法编译

我需要定时器每1秒启动一次功能。我试过SetTimer,我的代码:constUINT_PTRTIMER_ID=1000;DWORDDownloadThread(){SetTimer(NULL,TIMER_ID,1000,(TIMERPROC)DownloadSpeedCounter);/*somestuff*/}voidDownloadSpeedCounter(){/*somestuff*/}我无法编译此代码并得到errorC2440:'typecast':cannotconvertfrom'overloaded-function'to'TIMERPROC'也是类成员方法。