首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

MFC基于对话框的Media Player怎么实现全屏显示功能

2012-05-20 
MFC基于对话框的Media Player如何实现全屏显示功能?需求源代码,帮忙啊~~~~~[解决办法]试试下面这段代码C/C

MFC基于对话框的Media Player如何实现全屏显示功能?
需求源代码,帮忙啊~~~~~

[解决办法]
试试下面这段代码

C/C++ code
BOOL CPlay::SwitchFullScreen(BOOL bFullScreen){    CWnd* parentWnd = this->GetParent();    if ( NULL == m_ParentWnd && parentWnd != this->GetDesktopWindow())    {        m_ParentWnd = parentWnd;    }    if (bFullScreen)    {        this->SetParent(NULL);        ::SetWindowPos(this->GetSafeHwnd(), HWND_TOPMOST,-1,-1,-1,-1, SWP_NOMOVE|SWP_NOSIZE);        this->ShowWindow(SW_MAXIMIZE);           }    else    {        this->ShowWindow(SW_RESTORE);        ::SetWindowPos(this->GetSafeHwnd(), HWND_TOPMOST,-1,-1,-1,-1,SWP_NOMOVE|SWP_NOSIZE);        CRect parentBounds;        m_ParentWnd->GetClientRect(parentBounds);        this->SetParent(m_ParentWnd);        this->MoveWindow(parentBounds);            }    bFullScreen = !bFullScreen;        return bFullScreen;} 

热点排行