15,979
社区成员
发帖
与我相关
我的任务
分享
// 恢复窗口还是最大化显示
if ( !m_bIsFullScreen )
{
// 保存窗口的位置
GetWindowRect( m_rcFrame );
// 获取屏幕大小
int cx = GetSystemMetrics( SM_CXSCREEN );
int cy = GetSystemMetrics( SM_CYSCREEN );
// 隐藏掉头部控件
int nHeadHeight = m_wndTabView.GetHdrCtrlHeight();
int cxBorder = ::GetSystemMetrics(SM_CXBORDER) * 2;
int cyBorder = ::GetSystemMetrics(SM_CYBORDER) * 2;
// 去掉风格
ModifyStyle( WS_CAPTION | WS_THICKFRAME | WS_SYSMENU, 0 );
// 隐藏工具栏和状态栏
::ShowWindow(m_hWndStatusBar, SW_HIDE);
// 隐藏全部的Rebar窗口
CReBarCtrl rebar = m_hWndToolBar;
for ( UINT nIndex = 0; nIndex < rebar.GetBandCount(); ++nIndex )
{
rebar.ShowBand(nIndex, FALSE);
}
// 最大化显示窗口
MoveWindow( 0, -nHeadHeight - cyBorder, cx + cxBorder, cy + nHeadHeight + cyBorder * 4);
}
else
{
// 复原窗口
ModifyStyle(0, WS_CAPTION | WS_THICKFRAME | WS_SYSMENU );
::ShowWindow( m_hWndStatusBar, SW_SHOWNOACTIVATE );
CReBarCtrl rebar = m_hWndToolBar;
for ( UINT nIndex = 0; nIndex < rebar.GetBandCount(); ++nIndex )
{
rebar.ShowBand( nIndex, TRUE );
}
MoveWindow( m_rcFrame );
}
// 恢复窗口还是最大化显示
if ( !m_bIsFullScreen )
{
// 保存窗口的位置
GetWindowRect( m_rcFrame );
// 获取屏幕大小
int cx = GetSystemMetrics( SM_CXSCREEN );
int cy = GetSystemMetrics( SM_CYSCREEN );
// 隐藏掉头部控件
int nHeadHeight = m_wndTabView.GetHdrCtrlHeight();
int cxBorder = ::GetSystemMetrics(SM_CXBORDER) * 2;
int cyBorder = ::GetSystemMetrics(SM_CYBORDER) * 2;
// 去掉风格
ModifyStyle( WS_CAPTION | WS_THICKFRAME | WS_SYSMENU, 0 );
// 隐藏工具栏和状态栏
::ShowWindow(m_hWndStatusBar, SW_HIDE);
// 隐藏全部的Rebar窗口
CReBarCtrl rebar = m_hWndToolBar;
for ( UINT nIndex = 0; nIndex < rebar.GetBandCount(); ++nIndex )
{
rebar.ShowBand(nIndex, FALSE);
}
// 最大化显示窗口
MoveWindow( 0, -nHeadHeight - cyBorder, cx + cxBorder, cy + nHeadHeight + cyBorder * 4);
}
else
{
// 复原浏览器窗口
ModifyStyle(0, WS_CAPTION | WS_THICKFRAME | WS_SYSMENU );
::ShowWindow( m_hWndStatusBar, SW_SHOWNOACTIVATE );
CReBarCtrl rebar = m_hWndToolBar;
for ( UINT nIndex = 0; nIndex < rebar.GetBandCount(); ++nIndex )
{
rebar.ShowBand( nIndex, TRUE );
}
MoveWindow( m_rcFrame );
}