amishe

导航

Wince 6.0 窗口最大化显示

在InitDialog用如下代码实现:

CRect   m_FullScreenRect;   //全屏区域     

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;     

m_FullScreenRect.top=WindowRect.top-ClientRect.top;     

m_FullScreenRect.right=WindowRect.right-ClientRect.right+nFullWidth;     

m_FullScreenRect.bottom=WindowRect.bottom-ClientRect.bottom+nFullHeight;     

this->SetWindowPos(&wndBottom,m_FullScreenRect.left,m_FullScreenRect.top,m_FullScreenRect.Width(),m_FullScreenRect.Height(),SWP_SHOWWINDOW); 

posted on 2013-08-24 00:09  amishe  阅读(410)  评论(0编辑  收藏  举报