在基于对话框的MFC程序中实现视频播放的功能,其中使用了一个CStatic控件来显示摄像头的视频。现在想实现视频全屏显示的功能。使用下面的代码可以实现全屏播放,但是退不出来,也就是回不到全屏显示前的窗口显示状态。 CWnd *saveParent=m_staticVideo.GetParent();
m_staticVideo.SetParent(GetDesktopWindow());
CRect rect;
GetDesktopWindow()->GetWindowRect(&rect);
m_staticVideo.SetWindowPos(&wndTopMost,rect.left,rect.top,rect.right,rect.bottom,SWP_SHOWWINDOW);请高手们赐教,谢谢!
m_staticVideo.SetParent(GetDesktopWindow());
CRect rect;
GetDesktopWindow()->GetWindowRect(&rect);
m_staticVideo.SetWindowPos(&wndTopMost,rect.left,rect.top,rect.right,rect.bottom,SWP_SHOWWINDOW);请高手们赐教,谢谢!
m_staticVideo.GetWindowRect(&m_Rect);
ScreenToClient(&m_Rect);
UpdateLayout();