如何检测有游戏或视频正在全屏播放??

解决方案 »

  1.   

    static CWnd* PASCAL WindowFromPoint(POINT point)
    int GetDeviceCaps(int nIndex )
    找到屏幕四个角的点 看CWnd是不是一个 如果是 就是全屏的程序
    没有试现在试一下
      

  2.   

    Sleep(5000);
    CWnd* pWnd1 = NULL;
    CWnd* pWnd2 = NULL;
    CWnd* pWnd3 = NULL;
    CWnd* pWnd4 = NULL; CDC* pDC = GetWindowDC(); INT iWidth = GetDeviceCaps(pDC->m_hDC,HORZRES);
    INT iHeight = GetDeviceCaps(pDC->m_hDC,VERTRES);

    POINT pt1;
    pt1.x = 1;
    pt1.y = 1;
    POINT pt2;
    pt2.x = 1;
    pt2.y = iHeight-1;
    POINT pt3;
    pt3.x = iWidth-1;
    pt3.y = 1;
    POINT pt4;
    pt4.x = iWidth-1;
    pt4.y = iHeight-1; pWnd1 = WindowFromPoint(pt1);
    pWnd2 = WindowFromPoint(pt2);
    pWnd3 = WindowFromPoint(pt3);
    pWnd4 = WindowFromPoint(pt4); if(pWnd1 == pWnd2 && pWnd2 == pWnd3 && pWnd3 == pWnd4)
    AfxMessageBox("full screen run!");
    else
    AfxMessageBox("no full screen!");试了一下 可以检测到