要在Windows的Server里实现一个定时器,但是server是没有窗口的,回调函数的窗口怎么理解?
VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)UINT SetTimer(
HWND hWnd, // handle of window for timer messages
UINT nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // address of timer procedure
);
的窗口句柄怎么处理?
VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)UINT SetTimer(
HWND hWnd, // handle of window for timer messages
UINT nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // address of timer procedure
);
的窗口句柄怎么处理?
解决方案 »
- 在mfc 的扩展dll上使用LoadBitmap 失败,怎么解决?
- CRectTracker类与继承CSrollView视图的问题
- VC6下针式打印机如何实现逐行打印?
- CTreeCtrl使用了CheckBox类型为什么会不正常?
- 请教一个HIWORD和lParam的问题
- 远程文件读取
- 准备转学VC,先问个基础问题,盼指引
- ATL是干什么的,用在哪里,大家平时用的多吗?
- 请教一下各位高手,如何在列表框当中显示非CString类的数据?比如如何显示整型或者浮点型数据?
- 这几天在和一个美国公司合作,他问了我一个问题
- 飞行控件中的picture.cpp在编译提示不能打开?
- CListCtrl: 如何改变选择行时的颜色(去掉默认的〖可恶的〗兰色)?
You can process the message by providing a WM_TIMER case in the window procedure. Otherwise, DispatchMessage will call the TimerProc callback function specified in the call to the SetTimer function used to install the timer
HWND hWnd, // handle of window for timer messages
UINT nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // address of timer procedure
);
这里的hWnd只是说明你个定时器应用到这个窗口中,系统将产生在消息分发给这个窗体,如果窗口参数为NULL, 就是自己来处理WM_TIME消息。