首页
社区
课程
招聘
Win32 SetTimer的问题
发表于: 2010-2-10 19:08 4770

Win32 SetTimer的问题

2010-2-10 19:08
4770
大家好,我需要写一个SetTimer的定时器C++的,但是不希望在窗口中得到消息。。
我看c#既有form的定时器也有server的定时器。
win32有类似的server定时器吗。
用while,sleep实现不好。。我的函数可能会执行很长或者等待的呃。。

[课程]Android-CTF解题方法汇总!

收藏
免费 1
支持
分享
最新回复 (5)
雪    币: 399
活跃值: (38)
能力值: (RANK:350 )
在线值:
发帖
回帖
粉丝
2
不懂你说的那个server的定时器是什么意思
可以指定TimerFunction,这样窗体就不会收到WM_TIMER消息了
2010-2-10 19:15
0
雪    币: 285
活跃值: (16)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
3
c++中的SetTimer本来就不是给窗口发消息,那是MFC定制而已
2010-2-10 19:34
0
雪    币: 458
活跃值: (421)
能力值: ( LV9,RANK:610 )
在线值:
发帖
回帖
粉丝
4
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
);

Function Information
Minimum DLL Version user32.dll
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 95, Windows NT 3.1
Unicode Implemented as Unicode version.


SetTimer是系统API 何来c++的 or MFC的 之说?
2010-2-10 20:33
0
雪    币: 285
活跃值: (16)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
5
我知道那是API,我只是说他用的C++,而在MFC中是将时间定制成事件发送到窗口的
2010-2-10 21:16
0
雪    币: 18
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
谢谢。找到了。。。原来有2个回调的地方,呵呵开始太粗心了!
2010-2-11 10:58
0
游客
登录 | 注册 方可回帖
返回
//