Delphi TMessage[4] TMsg 类型结构

Delphi TMessage[4] TMsg 类型结构

TMsg对Windows消息中的信息进行编码

//Delphi
type
  TMsg = packed record
    hwnd: HWND;  //消息发送到的窗口的句柄。
    message: UINT;  //消息的标识符(Windows消息代码)。
    wParam: WPARAM;  //消息的wParam。
    lParam: LPARAM;  //消息的lParam。
    time: DWORD;  //消息发送的时间。
    pt: TPoint;   //发送消息时鼠标光标的位置。
  end;
//C++
typedef struct tagMSG {
    HWND        hwnd;
    UINT        message;
    WPARAM      wParam;
    LPARAM      lParam;
    DWORD       time;
    POINT       pt;
} MSG;
typedef tagMSG TMsg; 

TMsg类型保存Windows消息的详细信息。这是Windows用来编码消息的结构,与TMessage类型不同,TMessage类型对传递给CLX窗口过程的参数进行编码。

注意:在C++中,TMsg是根据在Winuser.h.中定义的tagMSG结构定义

 

 

 

 

 

创建时间:2022.05.26  更新时间:

posted on 2022-05-26 16:18  滔Roy  阅读(206)  评论(0编辑  收藏  举报

导航