要windows 的工具栏看不见才行
解决方案 »
- C++ 如何将Excel xlsm , xlsx格式保存为xls呢?反过来如何保存呢?
- 各位大侠,为什么compile没有错,build出错??
- dll 输出函数?CRYPT_GetLicTree@@YAPAVCRedBlackTree@@H@Z该如何定义
- 线程同步问题
- UDP能比TCP快多少?
- 时间转化问题
- 到底什么是环境变量?
- 插入图片到RichEdit控件后,CRichEidt::GetCharPos()得到的返回值就不准确了,怎么办?
- 请教制作游戏外挂的一些技术难题!!!
- 紧急求助!!!COM处理结果为字符串,用BSTR*如何返回给客户程序?
- ATL菜鸟提问:什么是 ATL 、有何用?
- 启动程序的巨难问题
if (!IsFullScreen())
{
// We'll need these to restore the original state.
m_wpPrev.length = sizeof(m_wpPrev);
GetWindowPlacement(&m_wpPrev);
if (m_pMDClientView == NULL)
return; CRect rectDesktop, rectFrame, rectView; // Adjust RECT to new size of window
VERIFY(::GetWindowRect(::GetDesktopWindow(), &rectDesktop));
GetWindowRect(&rectFrame);
CView *pVideoView = m_pMDClientView->GetPage(2);
//m_pMDClientView->GetWindowRect(&rectView);
pVideoView->GetWindowRect(&rectView);
rectFrame.InflateRect(rectView.left - rectDesktop.left, rectView.top - rectDesktop.top,
rectDesktop.right-rectView.right, rectDesktop.bottom-rectView.bottom);
m_rectFullScreenWindow = rectFrame;
wpNew = m_wpPrev;
wpNew.showCmd = SW_SHOWNORMAL;
wpNew.rcNormalPosition = rectFrame;
m_pwndFullScreenBar = new CBCGPToolBar;
if (!m_pwndFullScreenBar->Create(this))
{
TRACE0("Failed to create toolbar\n");
return; // fail to create
}
//don't allow the toolbar to dock
CBCGPToolbarButton button(ID_FULLSCREEN_VIEW, -1, _T("关闭全屏"), FALSE, TRUE);
m_pwndFullScreenBar->InsertButton(button);
m_pwndFullScreenBar->EnableDocking(0);
m_pwndFullScreenBar->SetWindowPos(0, 100, 100, 100, 100, SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW);
m_pwndFullScreenBar->SetWindowText(_T("全屏"));
m_pwndFullScreenBar->FloatControlBar(CRect(100, 100, 200, 200));
m_bFullScreen = TRUE;
}
else
{
// Destroy the toolbar
CWnd *pWnd = m_pwndFullScreenBar->GetParentMiniFrame();
if (pWnd == NULL)
pWnd = m_pwndFullScreenBar;
VERIFY(pWnd->DestroyWindow());
delete m_pwndFullScreenBar;
m_pwndFullScreenBar = NULL;
m_bFullScreen = FALSE;
{ // This is a workaround to prevent the toolbars from being broken
// into different rows, when the window is maximized and
// the restored position is too small.
WINDOWPLACEMENT wpNew(m_wpPrev);
VERIFY(::CopyRect(&wpNew.rcNormalPosition, &m_rectFullScreenWindow));
VERIFY(SetWindowPlacement(&wpNew));
} wpNew = m_wpPrev;
}
VERIFY(SetWindowPlacement(&wpNew));
参看上面的代码
m_pMainWnd->ShowWindow(SW_SHOW);
改成
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
你的程序的界面就能最大化显示了!
DevMode.dmSize = sizeof(DEVMODE);
DevMode.dmDriverExtra = 0;
EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&DevMode);
::SetWindowPos (m_hWnd, (HWND)NULL,0,0,
DevMode.dmPelsWidth,DevMode.dmPelsHeight,SWP_NOMOVE|SWP_NOZORDER);
对话框的
不要使用其它的风格,如层叠式窗口风格,标题栏等
可以参看<<Windows图形编程>>第一章中的一个例子,一位博干士写的
这是一本好书哦,快去买了收藏
m_pMainWnd->ShowWindow(SW_SHOW);
改成
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
你的程序的界面就能最大化显示了!vcforever(霓裳羽衣) 说得对,够简洁