posts - 13,comments - 0,trackbacks - 0

          //調用這個函數
          void CMainFrame::OnFullScreen()
          {	
          	// TODO: Add your command handler code here	
          	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);
          		
          	CRect m_FullScreenRect;
          	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.rcNormalPosition=m_FullScreenRect;		
          	SetWindowPlacement(&wndpl);		
          }
          posted on 2010-12-31 13:45 CrackRen 閱讀(86) 評論(0)  編輯  收藏 所屬分類: VC

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 巴楚县| 元谋县| 远安县| 班玛县| 图木舒克市| 泰宁县| 福贡县| 阳城县| 彭泽县| 广安市| 铜川市| 西充县| 浪卡子县| 梅河口市| 新安县| 郓城县| 迭部县| 武定县| 监利县| 三台县| 五大连池市| 禹城市| 浦东新区| 高邑县| 洛浦县| 大关县| 鹤岗市| 叶城县| 淮北市| 清水县| 永德县| 常熟市| 丹寨县| 布尔津县| 阳谷县| 柳州市| 黄平县| 新闻| 萍乡市| 郁南县| 麻城市|