在DLL中,没有窗体,而且不用线程,能否实现定时器Timer功能???
解决方案 »
- 子窗口和父窗口的通信问题!!!高手进!!!!!
- 串口的接受过程是怎样的?
- 受不了WIN32_FIND_DATA FindFileData;这个属性了,哪个来指点一下
- BoundsChecker出现如下错误!
- 我是新手,请教几个问题
- 在执行数据库操作,比如INSERT时候出错,是不是整个程序挂掉呢?
- 再次询问一个VC中取IP和MAC地址的问题
- 显示器的刷新频率与显卡有关还是与显示器有关?
- MsChart实现无闪烁动态曲线运行一段时间内存不能read
- MFC的CEdit和CRichEditCtrl中,对于微软拼音等一些输入法,它们的待确认文字的颜色如何与控件保持一致。
- 出了问题,VC不能安装,请前辈们解决下
- tree contol与list contol及数据库应用中怎么回出现数据50这个瓶颈,还显示问题?
以下代码就可以,timmer可以不要窗口的。VOID CALLBACK MyTimerProc( HWND hwnd,
UINT uMsg,
UINT_PTR idEvent,
DWORD dwTime
)
{};
SetTimer(NULL, // handle to main window
100, // timer identifier
5000, // 5-second interval
(TIMERPROC) MyTimerProc); // timer callback
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
hWnd参数解释
[in] 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.