全屏顯示源碼C++,VC

 void CViewerFrame::FullScreenShow()
{
 GetWindowPlacement(&m_OldWndPlacement);
 CRect WindowRect;
 GetWindowRect(&WindowRect);
 CRect ClientRect;
 RepositionBars(0,0xffff,AFX_IDW_PANE_FIRST,reposQuery,&ClientRect);
 ClientToScreen(&ClientRect);
 
 int nFullWidth=GetSystemMetrics(SM_CXSCREEN);
 int nFullHeight=GetSystemMetrics(SM_CYSCREEN);
 m_FullScreenRect.left=WindowRect.left-ClientRect.left-1;
 m_FullScreenRect.top=WindowRect.top-ClientRect.top-1;
 m_FullScreenRect.right=WindowRect.right-ClientRect.right+nFullWidth+2;
 m_FullScreenRect.bottom=WindowRect.bottom-ClientRect.bottom+nFullHeight+2;
 m_FullScreen=TRUE;
 
 WINDOWPLACEMENT wndpl;
 wndpl.length=sizeof(WINDOWPLACEMENT);
 wndpl.flags=0;
 wndpl.showCmd=SW_SHOWNORMAL;
 wndpl.rcNormalPosition=m_FullScreenRect;
 
 ShowWindow(SW_HIDE);
 SetWindowPlacement(&wndpl);
}


void CViewerFrame::EndFullScreen()
{
 m_FullScreen=FALSE;
 ShowWindow(SW_HIDE);
 SetWindowPlacement(&m_OldWndPlacement);
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章