首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Windows Mobile >

定时器的奇怪现象,该怎么处理

2012-01-23 
定时器的奇怪现象在Pocket2003平台下,用VS2005做的程序,里面使用了定时器0。可是调用SetTimer(0,1000,NULL)

定时器的奇怪现象
在Pocket2003平台下,用VS2005做的程序,里面使用了定时器0。可是调用SetTimer(0,1000,NULL)以后,定时器0似乎不工作。莫名,谁能告诉我原因啊?谢谢!

[解决办法]
This function creates a timer with the specified time-out value.

UINT SetTimer(
HWND hWnd,
UINT nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc );
Parameters
hWnd
Handle to the window to be associated with the timer. This window must be owned by the calling thread. If this parameter is NULL, no window is associated with the timer and the nIDEvent parameter is ignored.
nIDEvent
Specifies a nonzero timer identifier. If the hWnd parameter is NULL, this parameter is ignored.

MSDN有说明Specifies a nonzero timer identifier,你就不要钻牛角了

热点排行