📄 editshow.cpp
字号:
// EditShow.cpp : implementation file
//
#include "stdafx.h"
#include "HKVision.h"
#include "EditShow.h"
#include "hikserver.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
UINT shw;
BOOL fir;
/////////////////////////////////////////////////////////////////////////////
// EditShow dialog
EditShow::EditShow(CWnd* pParent /*=NULL*/)
: CDialog(EditShow::IDD, pParent)
{
//{{AFX_DATA_INIT(EditShow)
m_editshow = _T("");
//}}AFX_DATA_INIT
}
void EditShow::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(EditShow)
DDX_Text(pDX, IDC_EDIT11, m_editshow);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(EditShow, CDialog)
//{{AFX_MSG_MAP(EditShow)
ON_WM_TIMER()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// EditShow message handlers
BOOL EditShow::OnInitDialog()
{
CDialog::OnInitDialog();
m_editshow.Format("序号 SSRC 类型 丢包个数 丢包率 最高序号");
UpdateData(FALSE);
for(int i=0;i<16;i++)
ServerResetStatic(i);
shw = SetTimer(1,1000,0);
fir = TRUE;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void EditShow::OnTimer(UINT nIDEvent)
{
if (nIDEvent == 1)
{
NETSTATIC* rectemp=NULL;
int recnum;
CString ctemp;
m_editshow.Format("序号 SSRC 类型 丢包个数 丢包率 最高序号 \r\n");
for(int j=0;j<16;j++)
{
rectemp = ServerGetStatic(j,&recnum);
if (recnum>0)
for(int i=0;i<recnum;i++)
{
ctemp.Format("%s%3d%10d%d%16d %16d%d %11d %10d%d\r\n",m_editshow,i+1,
HIWORD(rectemp[i].ssrc),LOWORD(rectemp[i].ssrc),
rectemp[i].type,HIWORD(rectemp[i].losenum),LOWORD(rectemp[i].losenum),
rectemp[i].loseperc,HIWORD(rectemp[i].nohighest),LOWORD(rectemp[i].nohighest));
// HIWORD(rectemp[i].jitter),LOWORD(rectemp[i].jitter),
// HIWORD(rectemp[i].transtime),LOWORD(rectemp[i].transtime));
m_editshow.Format("%s",ctemp);
}
}
/*
m_editshow.Format("%s\r\n%8d%d%10d%10d%d%15d%13d%d%13d%d%10d%d",m_editshow,HIWORD(rectemp[i].ssrc),LOWORD(rectemp[i].ssrc),
rectemp[i].type,HIWORD(rectemp[i].losenum),LOWORD(rectemp[i].losenum),rectemp[i].loseperc,HIWORD(rectemp[i].nohighest),LOWORD(rectemp[i].nohighest),
HIWORD(rectemp[i].jitter),LOWORD(rectemp[i].jitter),HIWORD(rectemp[i].transtime),LOWORD(rectemp[i].transtime));
*/
UpdateData(FALSE);
if (fir)
{
KillTimer(shw);
shw = SetTimer(1,3000,0);
fir = FALSE;
}
}
CDialog::OnTimer(nIDEvent);
}
void EditShow::OnDestroy()
{
KillTimer(shw);
CDialog::OnDestroy();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -