在Windows中,消息是由MSG结构体来表示。MSG结构体的定义如下:
typedef struct tagMSG
{  HWND    hwnd;
   UINT    message;
   WPARAM  wParam;
   LPARAM  lParam;
   DWORD   time;
   POINT   pt;  
 } MSG
这里time表示消息投递到消息队列的时间。而时间的精确表示需要:年,月,日,时,分,妙,毫秒,
而这里仅仅用一个DWORD 就表示了,是怎么实现的呢?

解决方案 »

  1.   

    GetMessageTimeThe 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). 
      

  2.   

    这里的time是系统启动到消息发生时的毫秒数,就是GetTickCount得到的那个