当你走开,长久不碰鼠标和键盘时,QQ会显示一个离开的状态,这个是拦截什么消息?

解决方案 »

  1.   

    还有这消息?应该是QQ自己按HOOK监控吧~~
      

  2.   

    GetLastInputInfo
    用这个读取最后一次键盘和鼠标操作的时间。超过了指定的时间就认为人离开电脑了
      

  3.   

    GetLastInputInfo
    用这个读取最后一次键盘和鼠标操作的时间。超过了指定的时间就认为人离开电脑了这个有一定的道理,这个是系统API函数吗?
      

  4.   

    GetLastInputInfo
    用这个读取最后一次键盘和鼠标操作的时间。超过了指定的时间就认为人离开电脑了这个有一定的道理,这个是系统API函数吗?
    ------------------------------------------------------------
    MSDN是个宝,多看看
      

  5.   

    GetLastInputInfo
    用这个读取最后一次键盘和鼠标操作的时间。超过了指定的时间就认为人离开电脑了这个即简单有方便啊
      

  6.   

    #include <iostream>
    #include <windows.h>
    using namespace std;void main()
    {
        LASTINPUTINFO plii;
        GetLastInputInfo(&plii);  
    }C:\flexlm\GetLastInputInfo\GetLastInputInfo.cpp(9) : error C2065: 'LASTINPUTINFO' : undeclared identifier
    C:\flexlm\GetLastInputInfo\GetLastInputInfo.cpp(9) : error C2146: syntax error : missing ';' before identifier 'plii'
    C:\flexlm\GetLastInputInfo\GetLastInputInfo.cpp(9) : error C2065: 'plii' : undeclared identifier
    C:\flexlm\GetLastInputInfo\GetLastInputInfo.cpp(10) : error C2065: 'GetLastInputInfo' : undeclared identifier在VC中编译了一下,怎么有以上错误啊?帮我看看
      

  7.   

    http://www.vckbase.com/vckbase/vckbase6/vc/nonctrls/system_30/0630001.htm
      

  8.   

    WIN API应该不止调用这两个库吧
    测试这种东西,用MFC啊
    命令行模式也有点夸张了啊
      

  9.   

    The GetLastInputInfo function retrieves the time of the last input event.
    Syntax
    BOOL GetLastInputInfo( PLASTINPUTINFO plii);
    Parameters
    plii
    [out] Pointer to a LASTINPUTINFO structure that receives the time of the last input event. 
    Return Value
    If the function succeeds, the return value is nonzero.
    If the function fails, the return value is zero. Res
    This is useful for input idle detection.
    这个看看,不错的,