在视图类的鼠标移动事件中如何获取鼠标移动事件创建的时间?
时间:2011-12-23
来源:互联网
我知道MSG结构中有一个时间字段,但鼠标移动事件中如何获取鼠标移动事件创建的时间?下面函数原型中根本就没有事件创建时间的参数.
void CMyView::OnMouseMove(UINT nFlags, CPoint point)
{
……
如何获取鼠标移动事件创建的时间?
……
}
void CMyView::OnMouseMove(UINT nFlags, CPoint point)
{
……
如何获取鼠标移动事件创建的时间?
……
}
作者: xqlu2007 发布时间: 2011-12-23
需要时间精确吗?可以在获得鼠标事件中GetCurrentTime()
作者: zqckzqck 发布时间: 2011-12-23
CTime ::GetCurrentTime() 用这个来获取时间
作者: shen_wei 发布时间: 2011-12-23
CTime::GetCurrentTime()就是时间啊
作者: yayafu 发布时间: 2011-12-23
MSG msg;
GetMessage(&msg, NULL, 0, 0)
===========================================================================
MSG Structure
--------------------------------------------------------------------------------
The MSG structure contains message information from a thread's message queue.
Syntax
typedef struct {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG, *PMSG;
Members
hwnd
Handle to the window whose window procedure receives the message.
message
Specifies the message identifier. Applications can only use the low word; the high word is reserved by the system.
wParam
Specifies additional information about the message. The exact meaning depends on the value of the message member.
lParam
Specifies additional information about the message. The exact meaning depends on the value of the message member.
time
Specifies the time at which the message was posted.
pt
Specifies the cursor position, in screen coordinates, when the message was posted.
GetMessage(&msg, NULL, 0, 0)
===========================================================================
MSG Structure
--------------------------------------------------------------------------------
The MSG structure contains message information from a thread's message queue.
Syntax
typedef struct {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG, *PMSG;
Members
hwnd
Handle to the window whose window procedure receives the message.
message
Specifies the message identifier. Applications can only use the low word; the high word is reserved by the system.
wParam
Specifies additional information about the message. The exact meaning depends on the value of the message member.
lParam
Specifies additional information about the message. The exact meaning depends on the value of the message member.
time
Specifies the time at which the message was posted.
pt
Specifies the cursor position, in screen coordinates, when the message was posted.
作者: hping1016 发布时间: 2011-12-23
或者
GetMessageTime
The GetMessageTime function retrieves the message time for the last message retrieved by the GetMessage function. The time is a long integer that specifies the elapsed time, in milliseconds, from the time the system was started to the time the message was created (that is, placed in the thread's message queue).
GetMessageTime
The GetMessageTime function retrieves the message time for the last message retrieved by the GetMessage function. The time is a long integer that specifies the elapsed time, in milliseconds, from the time the system was started to the time the message was created (that is, placed in the thread's message queue).
作者: hping1016 发布时间: 2011-12-23
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28