DLL中,怎么样使用Timer?

gwsr 2006-10-18 04:22:48
用向导生成一个DLL,类型是Regular DLL using shared MFC DLL,请问:这个DLL中没有也不打算使用Dialog资源,怎么样使用WM_TIMER呢?网上查了一下,有人说写CALLBACK函数,有人说写了也没用,请问究竟应该咋办,谢谢!
...全文
275 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
qwertxp 2006-11-01
  • 打赏
  • 举报
回复
凡路过必留下痕迹 ......
DentistryDoctor 2006-10-18
  • 打赏
  • 举报
回复
用回调函数的形式,或用多媒体定时器。
SetTimer Function

--------------------------------------------------------------------------------

The SetTimer function creates a timer with the specified time-out value.

Syntax

UINT_PTR SetTimer( HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);

lpTimerFunc
[in] Pointer to the function to be notified when the time-out value elapses. For more information about the function, see TimerProc. If lpTimerFunc is NULL, the system posts a WM_TIMER message to the application queue. The hwnd member of the message's MSG structure contains the value of the hWnd parameter.

VOID CALLBACK TimerProc( HWND hwnd,
UINT uMsg,
UINT_PTR idEvent,
DWORD dwTime
);




Multimedia Timer Functions
The following functions are used with multimedia timers.

timeBeginPeriod
timeEndPeriod
timeGetDevCaps
timeGetSystemTime
timeGetTime
timeKillEvent
TimeProc
timeSetEvent
gaopl_8278 2006-10-18
  • 打赏
  • 举报
回复
用SetTimer(),它的回调函数就是LRESULT CALLBACK OnTimer()
yjgx007 2006-10-18
  • 打赏
  • 举报
回复
无窗口实现settimer,很简单的,你到www.vckbase.com上搜一下吧!
#### 收益: 学习《optee系统开发精讲 》套餐的收益如下:1、全体系的掌握optee的核心知识点(多核多线程、启动流程、各类API、TA/PTA/STA、driver、service、各类设计思想、内存管理、断管理...);2、掌握TEE OS的设计核心思想(不限与optee,对其它TEE也是如此),能够进入软件架构层次的各项设计;3、快速熟悉大系统软件的各项组件,能够进行大系统软件之间的设计或排查问题4、学习和理解理解Armv8/Armv9架构、Trustzone架构5、技术水平提升N个level, 掌握快速的学习方法;#### 课程简介和大纲 该课程包含但不限与以下章节:optee的组件介绍optee os启动流程optee os的初始化流程optee os线程向量表及其作用进入optee os的八种方式optee os的异常向量表和设计模型optee os对irq断的处理optee os对fiq断的处理optee os的内存管理optee os的MMU的使用optee os的根密钥(信任根)optee os的RPC机制optee os的存储系统optee os的SFS系统optee os的RPMB机制的实现optee os的Timer实现optee os实现的GP APIoptee os的系统调度optee os密码学函数的支持optee os的线程调度CA/TA的开发模型optee os的serviceoptee os的 PTAoptee os的 secure driveroptee os的 Early TAopteespinlock的实现原理详解opteemutex的实现方式optee的栈指针和栈内存的介绍optee使用虚函数(平台客制化)的设计模型共享内存的介绍optee os的标准错误码TA的签名和验签TA链接静态库的方法

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧