设置时间触发器,每隔0。1秒执行
OnTimer()函数。。

解决方案 »

  1.   

    第一个参数只是一个数字标识,因为你的程序中可能有好几个时间触发.
    第二个参数是以毫秒计的触发周期.
    第三个参数表示触发的回调函数地址.如果为NULL,则OnTimer的消息会发到
    消息队列里面等待处理.此时你可以在OnTimer()过程中执行你要周期执行的
    工作.
      

  2.   

    能否告知其中的 1,100,null分别有何用途?
      

  3.   

    UINT SetTimer( UINT nIDEvent, UINT nElapse, void (CALLBACK EXPORT* lpfnTimer)(HWND, UINT, UINT, DWORD) );Return ValueThe timer identifier of the new timer if the function is successful. An application passes this value to the KillTimer member function to kill the timer. Nonzero if successful; otherwise 0.ParametersnIDEventSpecifies a nonzero timer identifier.nElapseSpecifies the time-out value, in milliseconds.lpfnTimerSpecifies the address of the application-supplied TimerProc callback function that processes the WM_TIMER messages. If this parameter is NULL, the WM_TIMER messages are placed in the application’s message queue and handled by the CWnd object.MSDN中的!