資源簡介
該資源能夠實現視頻的動態顯示,其視頻窗口可以實現從單屏到多屏的切換以及到全屏的切換
代碼片段和文件信息
//?BSWndContainer.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“BSWndContainer.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CBSWndContainer
CBSWndContainer::CBSWndContainer()
{
//?init?active?page?pointer
m_pActivePage =?NULL;
//?init?window?state
m_bFullScreen =?FALSE; //?Full?screen?sign?
//m_bMultiScreen =?TRUE; //?Multiple-window?sign?
m_bMultiScreen =?FALSE; //?Multiple-window?sign?
m_bAutoAdjustPos=?FALSE; //?Auto?adjust?sign?
SetDrawActivePage(TRUE); // Enable?frame
m_nShowPortion=100; // Display?proportion?
}
CBSWndContainer::~CBSWndContainer()
{
//?remove?all?pages
while(!m_PageList.IsEmpty())
m_PageList.RemoveHead();
}
BEGIN_MESSAGE_MAP(CBSWndContainer?CWnd)
//{{AFX_MSG_MAP(CBSWndContainer)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CBSWndContainer?member?functions
///////////////////////////////////////////////////
//?call?this?function?to?create?container?object.
//?it?is?override?from?cwnd?class
BOOL?CBSWndContainer::Create(?LPCTSTR?lpszClassName?LPCTSTR?lpszWindowName?DWORD?dwstyle?const?RECT&?rect?CWnd*?pParentWnd?UINT?nID?CCreateContext*?pContext?)
{
dwstyle|=WS_EX_TOOLWINDOW;
return?CWnd::Create(lpszClassNamelpszWindowNamedwstylerectpParentWndnIDpContext?);
}
///////////////////////////////////////////////////
//?call?this?function?to?add?a?page?wnd?to?
//?container.?if?success?retrun?TRUEelse?return?
//?FALSE.
BOOL?CBSWndContainer::AddPage(CWnd?*pWnd?BOOL?bRepaint)
{
//?check?parameter
if( !pWnd?||?!IsWindow(pWnd->m_hWnd)?) return?FALSE;
//?check?list?
POSITION?pos=m_PageList.Find(pWnd);
if(pos!=NULL)?
{
TRACE(“This?Window?has?been?added?to?container?the?operation?will?terminate.\n“);
return?TRUE;
}
//?added?page
m_PageList.AddTail(pWnd);
if(?m_bDrawActive?)?DrawActivePage(FALSE);
//?reset?active?page
SetActivePage(pWnd?bRepaint);
return?TRUE;
}
///////////////////////////////////////////////////
//?call?this?function?to?remove?a?page?wnd?from
//?container.?
CWnd?*CBSWndContainer::DelPage(CWnd?*pWnd)
{
//?check?list
POSITION?pos=m_PageList.Find(pWnd);
if(pos==NULL)
{
TRACE(“This?Window?is?not?a?member?of?container?the?operation?will?terminate.\n“);
return?NULL;
}
if(pWnd==m_pActivePage)
if(m_pActivePage==GetPrevPage(pWnd))//m_PageList.IsEmpty()?NULL:m_PageList.GetHead();
m_pActivePage=NULL;
else?m_pActivePage=GetPrevPage(pWnd);
m_PageList.RemoveAt(pos);
if?(pWnd)
{
pWnd->ShowWindow(SW_HIDE);
}
// Invalidate();
return?pWnd;
}
///////////////////////////////////////////////////
//?call?this?function?to?remove?active?page?from
//?container.
CWnd?*CBSWndContainer::DelPage()
{
return?DelPage(m_
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????148913??2016-06-13?13:45??MultiPlayWindow\1.jpeg
?????文件???????3700??2016-06-11?18:23??MultiPlayWindow\11122.jpeg
?????文件??????28254??2016-06-12?15:30??MultiPlayWindow\2.jpeg
?????文件??????12273??2016-06-13?23:00??MultiPlayWindow\BSWndContainer.cpp
?????文件???????6403??2016-06-13?21:18??MultiPlayWindow\BSWndContainer.h
?????文件????????435??2016-06-07?10:28??MultiPlayWindow\ClassDiagram1.cd
?????文件??????90112??2016-04-01?14:20??MultiPlayWindow\Debug\aacdec.dll
?????文件??????28672??2016-04-01?14:20??MultiPlayWindow\Debug\adpcmdec.dll
?????文件?????614487??2016-04-01?14:20??MultiPlayWindow\Debug\amrdec.dll
?????文件????????414??2016-04-01?14:20??MultiPlayWindow\Debug\avglobal.h
?????文件????1110099??2016-04-01?14:38??MultiPlayWindow\Debug\avnetsdk.dll
?????文件??????82470??2016-06-15?09:59??MultiPlayWindow\Debug\BSWndContainer.obj
?????文件???????6278??2016-06-15?11:19??MultiPlayWindow\Debug\cl.command.1.tlog
?????文件??????76868??2016-06-15?11:19??MultiPlayWindow\Debug\CL.read.1.tlog
?????文件???????5010??2016-06-15?11:19??MultiPlayWindow\Debug\CL.write.1.tlog
?????文件??????11695??2016-06-01?17:18??MultiPlayWindow\Debug\ClientDemo.Build.CppClean.log
?????文件????????704??2016-06-01?17:18??MultiPlayWindow\Debug\ClientDemo.log
?????文件????1806422??2016-04-01?14:37??MultiPlayWindow\Debug\dhconfigsdk.dll
?????文件?????551537??2016-04-01?14:20??MultiPlayWindow\Debug\dhconfigsdk.h
?????文件???????5102??2016-04-01?14:37??MultiPlayWindow\Debug\dhconfigsdk.lib
?????文件?????483840??2016-04-01?14:20??MultiPlayWindow\Debug\dhlog.dll
?????文件????6316115??2016-04-01?14:37??MultiPlayWindow\Debug\dhnetsdk.dll
?????文件????1506500??2016-04-01?14:20??MultiPlayWindow\Debug\dhnetsdk.h
?????文件?????148842??2016-04-01?14:37??MultiPlayWindow\Debug\dhnetsdk.lib
?????文件?????823345??2016-04-01?14:20??MultiPlayWindow\Debug\dhplay.dll
?????文件?????450560??2016-04-01?14:20??MultiPlayWindow\Debug\fisheye.dll
?????文件??????61440??2016-04-01?14:20??MultiPlayWindow\Debug\g7221dec.dll
?????文件?????956416??2016-04-01?14:20??MultiPlayWindow\Debug\h264dec.dll
?????文件?????778240??2016-04-01?14:20??MultiPlayWindow\Debug\hevcdec.dll
?????文件?????675840??2016-04-01?14:20??MultiPlayWindow\Debug\Infra.dll
............此處省略114個文件信息
評論
共有 條評論