这位老师您好:
            如何实现全屏幕(VC++)?就象游戏中的那样。

解决方案 »

  1.   

    CRect m_FullScreenRect;
    CRect WindowRect; 
    GetWindowRect(&WindowRect); 
    CRect ClientRect; 
    int nFullWidth=GetSystemMetrics(SM_CXSCREEN);
    int nFullHeight=GetSystemMetrics(SM_CYSCREEN);

    RepositionBars(0,0xffff, AFX_IDW_PANE_FIRST,reposQuery,&ClientRect); 
    ClientToScreen(&ClientRect); 
    m_FullScreenRect.left=WindowRect.left-ClientRect.left;
    m_FullScreenRect.top=WindowRect.top-ClientRect.top;
    m_FullScreenRect.right=WindowRect.right-ClientRect.right+nFullWidth;
    m_FullScreenRect.bottom=WindowRect.bottom-ClientRect.bottom+nFullHeight;
    WINDOWPLACEMENT wndpl;
    wndpl.length=sizeof(WINDOWPLACEMENT); 
    wndpl.flags=0; 
    wndpl.showCmd=SW_SHOWNORMAL; 
    wndpl.rcNormalPosition=m_FullScreenRect; 
    SetWindowPlacement(&wndpl);
      

  2.   

    http://www.vckbase.com/document/finddoc.asp?keyword=%C8%AB%C6%C1
    有问题的时候到一些好的网站上去看看
    一般都有答案的
    自强不息
      

  3.   

    很麻烦,去http://search.csdn.net/
    找vc全屏
      

  4.   

    void ***::AdaptScreen(void)
    {
    ShowWindow(SW_SHOWMAXIMIZED); int x,y;
    float multiple;
    int newx,newy,newwidth,newheight;

    x=GetSystemMetrics( SM_CXSCREEN );
    y=GetSystemMetrics( SM_CYSCREEN );

    multiple=(float)x/800;
    if (x==800 || x==600)
    {
    return;
    }

    CWnd *pWndChild=GetWindow(GW_CHILD);
    while(pWndChild)
    {
    CRect rc;
    pWndChild->GetWindowRect(&rc);
    newx=(int)(rc.left*multiple);
    newy=(int)(rc.top*multiple);
    newwidth=(int)(rc.Width()*multiple);
    newheight=(int)(rc.Height()*multiple);

    pWndChild->MoveWindow(newx,newy,newwidth,newheight);

    pWndChild=pWndChild->GetNextWindow();
    }
    }
      

  5.   

    int cx, cy; 
    HDC dc = ::GetDC(NULL); 
    cx = GetDeviceCaps(dc,HORZRES) + 
    GetSystemMetrics(SM_CXBORDER); 
    cy = GetDeviceCaps(dc,VERTRES) +
    GetSystemMetrics(SM_CYBORDER); 
    ::ReleaseDC(0,dc);  ::SetWindowLong(GetSafeHwnd(), GWL_STYLE, ::GetWindowLong(GetSafeHwnd(), GWL_STYLE) & (~(WS_CAPTION|WS_BORDER)) );
    ::SetWindowPos(GetSafeHwnd(), HWND_TOPMOST, 
    -(GetSystemMetrics(SM_CXBORDER)) + 1,
    -(GetSystemMetrics(SM_CYBORDER)) + 1,
    cx+1,
    cy+1,
    SWP_NOZORDER);