我创建了一全屏窗口,但总是有边框,且下边总留有任务栏的空区(即便隐藏任务栏),请问为何?

解决方案 »

  1.   

    GetWindowRect(&m_rcMain);//restore the src screen's size;
        //delete the showing window's caption
    LONG style = GetWindowLong(m_hWnd,GWL_STYLE);
    style &=~WS_CAPTION;
    //set the window's show sytle
    SetWindowLong(m_hWnd,GWL_STYLE,style);
    //get the screen's pixel
    int screenX = GetSystemMetrics(SM_CXSCREEN);
    int screenY = GetSystemMetrics(SM_CYSCREEN);
    //show window
    SetWindowPos(NULL,0,0,screenX,screenY,SWP_NOZORDER);
      

  2.   

    int screenX = GetSystemMetrics(SM_CXSCREEN);
    int screenY = GetSystemMetrics(SM_CYSCREEN);要获取整个屏幕的大小阿