// MenuDlg.cpp : 实现文件
//

#include "stdafx.h"
#include "NetSDKDemo.h"
#include "NetSDKDemoDlg.h"
#include "MenuDlg.h"
#include "DevListDlg.h"
#include "WndManager.h"

// CMenuDlg 对话框

IMPLEMENT_DYNAMIC(CMenuDlg, CDialog)

CMenuDlg::CMenuDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CMenuDlg::IDD, pParent)
{

}

CMenuDlg::~CMenuDlg()
{
	DestroyWindow();
}

void CMenuDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_CB_LOOP, m_ctlLoopElapse);
	DDX_Control(pDX, IDC_BTN_PLAYLOOP, m_ctlLoopBtn);
	DDX_Control(pDX, IDC_BTN_OPENAUDIO, m_btnVoice);
}


BEGIN_MESSAGE_MAP(CMenuDlg, CDialog)
	ON_BN_CLICKED(IDC_BUTTON2, &CMenuDlg::OnBnClickedButton2)
	ON_BN_CLICKED(IDC_BTN_CLOSE_VIDEO, &CMenuDlg::OnBnClickedBtnCloseVideo)
	ON_BN_CLICKED(IDC_BTN_OPENAUDIO, &CMenuDlg::OnBnClickedBtnOpenaudio)
	ON_BN_CLICKED(IDC_BUTTON1, &CMenuDlg::OnBnClickedButton1)
	ON_BN_CLICKED(IDC_BTN_RIGHTCTRL, &CMenuDlg::OnBnClickedBtnRightctrl)
	ON_COMMAND(ID_VIEWWND_1, &CMenuDlg::OnViewwnd1)
	ON_COMMAND(ID_VIEWWND_2, &CMenuDlg::OnViewwnd2)
	ON_COMMAND(ID_VIEWWND_3, &CMenuDlg::OnViewwnd3)
	ON_COMMAND(ID_VIEWWND_4, &CMenuDlg::OnViewwnd4)
	ON_COMMAND(ID_VIEWWND_5, &CMenuDlg::OnViewwnd5)
	ON_COMMAND(ID_MENU3_32783_DEVCTRL, &CMenuDlg::OnMenu332783Devctrl)
	ON_COMMAND(ID_MENU3_32784_TOUR_SCAN, &CMenuDlg::OnMenu332784TourScan)
	ON_COMMAND(ID_MENU3_32785_UP_DOWNLOAD, &CMenuDlg::OnMenu332785UpDownload)
	ON_COMMAND(ID_MENU3_32793_CODEPARAM, &CMenuDlg::OnMenu332793Codeparam)
	ON_COMMAND(ID_MENU3_LOCALRECORD, &CMenuDlg::OnMenu3Localrecord)
	ON_COMMAND(ID_MENU3_32796_FILELOAD, &CMenuDlg::OnMenu332796Fileload)
	ON_COMMAND(ID_MENU3_32804_VOICE, &CMenuDlg::OnMenu332804Voice)
	ON_COMMAND(ID_MENU3_32806_DEV_CONFIG, &CMenuDlg::OnMenu332806DevConfig)
	ON_COMMAND(ID_MENU3_32822_SNAP, &CMenuDlg::OnMenu332822Snap)
	ON_COMMAND(ID_MENU3_32848_ZOOMRECT, &CMenuDlg::OnMenu332848Zoomrect)
	ON_BN_CLICKED(IDC_BTN_PLAYLOOP, &CMenuDlg::OnBnClickedBtnPlayloop)
	ON_CBN_EDITCHANGE(IDC_CB_LOOP, &CMenuDlg::OnCbnEditchangeCbLoop)
END_MESSAGE_MAP()


// CMenuDlg 消息处理程序

void CMenuDlg::OnBnClickedButton2()
{
	// TODO: 在此添加控件通知处理程序代码
	POINT pt;
	GetCursorPos(&pt);
	m_menu2.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | 

		TPM_RIGHTBUTTON, pt.x, pt.y, this, NULL);
}

void CMenuDlg::SetBtnVoiceStatus()
{
	CString key;
	key.Empty();
	((CNetSDKDemoDlg *)theApp.m_pMainWnd)->m_pWndManager->GetCurWndUser(key);

	if (key.GetLength() <= 0)
	{
		m_btnVoice.EnableWindow(FALSE);
	}
	else
	{

		CDevInfo *pDevInfo = NULL;
		theApp.m_DevList.Lookup(key, pDevInfo);
		if (NULL == pDevInfo || pDevInfo->bAddTalk)
		{
			m_btnVoice.EnableWindow(FALSE);
		}
		else
		{
			m_btnVoice.EnableWindow(TRUE);
			m_btnVoice.SetWindowText(pDevInfo->iOpenAudio > 0 ? _T("关闭音频") : _T("开启音频"));
		}
	}

	return;
}

extern HWND g_LoopWnd;
extern BOOL g_isLoop;
void CMenuDlg::OnBnClickedBtnCloseVideo()
{
	// TODO: 在此添加控件通知处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)theApp.m_pMainWnd;

	HWND hWnd = pNetSDKDemoDlg->GetCurSelWnd();
	if (NULL == hWnd)
	{
		return;
	}

	if (g_LoopWnd == hWnd)
	{
		g_isLoop = FALSE;
	}
	

	CString strKey = pNetSDKDemoDlg->GetWndUser(hWnd);
	
	CDevInfo *pDevInfo = NULL;
	theApp.m_DevList.Lookup(strKey, pDevInfo);
	if (NULL == pDevInfo)
	{
		return;
	}

	if (NULL != pDevInfo->m_pRemotePlayBack && pDevInfo->m_pRemotePlayBack->m_hWnd == hWnd)
	{
		pNetSDKDemoDlg->m_pRecordDlg->CloseMedia(strKey);
	}
	else
	{
		pNetSDKDemoDlg->m_pWndDevList->CloseMedia(strKey);
	}

	SetBtnVoiceStatus();
	return;
#if 0
	CDevListDlg *pDevListDlg = pNetSDKDemoDlg->m_pWndDevList;
	CRecordDlg *pRecordDlg = pNetSDKDemoDlg->m_pRecordDlg;
	
	
	if (pDevListDlg)
	{
		HWND hPlayWnd = NULL;
		CAVPlayer *pRemotePlayBack = NULL;
		{
			CDevInfo *pDevInfo = NULL;
			CMapAutoLock Lock;
			BOOL bFound = theApp.m_DevList.Lookup(strKey, pDevInfo);
			if (bFound)
			{
				pRemotePlayBack = pDevInfo->m_pRemotePlayBack;
				hPlayWnd = pDevInfo->hRealPlayWnd;
			}
		}
		if (pRemotePlayBack && pRemotePlayBack->m_hWnd == hWnd)
		{
			pRecordDlg->CloseMedia(strKey);
		}
		else 
		{
			pDevListDlg->CloseMedia(strKey);
		}
		
	}

	pNetSDKDemoDlg->SetWndUser(hWnd, NULL);
#endif
}

void CMenuDlg::OnBnClickedBtnOpenaudio()
{
	CDevInfo * pDevInfo = NULL;
	POSITION pos = theApp.m_DevList.GetStartPosition();
	while (pos)
	{
		CString strKey;
		CDevInfo *pDevInfo = NULL;
		theApp.m_DevList.GetNextAssoc(pos, strKey, pDevInfo);
		if (pDevInfo && pDevInfo->bAddTalk > 0)
		{
			//pDevInfo->iOpenAudio = 0;
			char szTmp[128] = {0};
			sprintf(szTmp, "%s正在对讲， 不能操作语音", strKey.GetBuffer());
			MessageBox(szTmp, NULL, MB_OK);
			return;
		}
	}


	// TODO: 在此添加控件通知处理程序代码
	HWND hWnd = ((CNetSDKDemoDlg *)GetParent())->GetCurSelWnd();
	CString strKey = ((CNetSDKDemoDlg *)GetParent())->GetWndUser(hWnd);
	BOOL bFound = FALSE;
	{
		CMapAutoLock Lock;
		CDevInfo *pDevInfo = NULL;
		bFound = theApp.m_DevList.Lookup(strKey, pDevInfo);
		if (bFound)
		{
			if (pDevInfo->iOpenAudio <= 0)
			{
				POSITION pos = theApp.m_DevList.GetStartPosition();
				while (pos)
				{
					CString strKeyEx;
					CDevInfo *pDevInfoEx = NULL;
					theApp.m_DevList.GetNextAssoc(pos, strKeyEx, pDevInfoEx);
					if (pDevInfoEx)	pDevInfoEx->iOpenAudio = 0;
				}
				pDevInfo->iOpenAudio = 1;
				GetDlgItem(IDC_BTN_OPENAUDIO)->SetWindowText(_T("关闭音频"));
			}
			else
			{
				pDevInfo->iOpenAudio = 0;
				GetDlgItem(IDC_BTN_OPENAUDIO)->SetWindowText(_T("开启音频"));
			}
		}
	}

	if (!bFound)
	{
		AfxMessageBox("请选择开启视频的窗口!!!");
		return ;
	}
}

void CMenuDlg::OnBnClickedButton1()
{
	// TODO: 在此添加控件通知处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->FullScreen();
}

void CMenuDlg::OnBnClickedBtnRightctrl()
{
	// TODO: 在此添加控件通知处理程序代码
	POINT pt;
	GetCursorPos(&pt);
	
	if (theApp.m_OnlyOneAction.miWhat != 0)
	{
		AfxMessageBox(theApp.m_OnlyOneAction.mstrMSG);
		return ;
	}

	m_menu3.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | 

		TPM_RIGHTBUTTON, pt.x, pt.y, this, NULL);

}

BOOL CMenuDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// TODO:  在此添加额外的初始化
	m_menu2.LoadMenu(IDR_MENU2);
	m_menu3.LoadMenu(IDR_MENU3);
	OnViewwnd1();

	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
	OnViewwnd2();
	m_ctlLoopElapse.SetCurSel(0);

	SetBtnVoiceStatus();
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}


void CMenuDlg::ShowSelWnd()
{
	MENUITEMINFO mItemInfo;
	UINT state = m_menu3.GetMenuState(ID_MENU3_32783_DEVCTRL, MF_BYCOMMAND);
	if(state == 0xFFFFFFFF)	return;
	if (state & MF_CHECKED)	OnMenu332783Devctrl();

	state = m_menu3.GetMenuState(ID_MENU3_32784_TOUR_SCAN, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu332784TourScan();

	state = m_menu3.GetMenuState(ID_MENU3_32785_UP_DOWNLOAD, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu332785UpDownload();

	state = m_menu3.GetMenuState(ID_MENU3_32793_CODEPARAM, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu332793Codeparam();

	state = m_menu3.GetMenuState(ID_MENU3_LOCALRECORD, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu3Localrecord();

	state = m_menu3.GetMenuState(ID_MENU3_32796_FILELOAD, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu332796Fileload();

	state = m_menu3.GetMenuState(ID_MENU3_32804_VOICE, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu332804Voice();

	state = m_menu3.GetMenuState(ID_MENU3_32806_DEV_CONFIG, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu332806DevConfig();
	
	state = m_menu3.GetMenuState(ID_MENU3_32822_SNAP, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu332822Snap();

	state = m_menu3.GetMenuState(ID_MENU3_32848_ZOOMRECT, MF_BYCOMMAND);
	if (state == 0xFFFFFFFF) return ;
	if (state & MF_CHECKED)	OnMenu332848Zoomrect();
}

void CMenuDlg::CloseVideo()
{
	OnBnClickedBtnCloseVideo();
}

void CMenuDlg::OnViewwnd1()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	if (pNetSDKDemoDlg->m_pWndManager)
		pNetSDKDemoDlg->m_pWndManager->SetViewWnd(1, 1);
	m_menu2.CheckMenuItem(ID_VIEWWND_1, MF_CHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_2, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_3, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_4, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_5, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnViewwnd2()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	if (pNetSDKDemoDlg->m_pWndManager)
		pNetSDKDemoDlg->m_pWndManager->SetViewWnd(2, 2);
	m_menu2.CheckMenuItem(ID_VIEWWND_1, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_2, MF_CHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_3, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_4, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_5, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnViewwnd3()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	if (pNetSDKDemoDlg->m_pWndManager)
		pNetSDKDemoDlg->m_pWndManager->SetViewWnd(3, 3);
	m_menu2.CheckMenuItem(ID_VIEWWND_1, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_2, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_3, MF_CHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_4, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_5, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnViewwnd4()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	if (pNetSDKDemoDlg->m_pWndManager)
		pNetSDKDemoDlg->m_pWndManager->SetViewWnd(4, 4);
	m_menu2.CheckMenuItem(ID_VIEWWND_1, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_2, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_3, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_4, MF_CHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_5, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnViewwnd5()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	if (pNetSDKDemoDlg->m_pWndManager)
		pNetSDKDemoDlg->m_pWndManager->SetViewWnd(5, 5);
	m_menu2.CheckMenuItem(ID_VIEWWND_1, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_2, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_3, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_4, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu2.CheckMenuItem(ID_VIEWWND_5, MF_CHECKED | MF_BYCOMMAND);
}

BOOL CMenuDlg::PreTranslateMessage(MSG* pMsg)
{
	// TODO: 在此添加专用代码和/或调用基类
	if (pMsg->message == WM_KEYDOWN)
	{
		if (pMsg->wParam == 13)
			return TRUE;
		if (pMsg->wParam == 27)
		{
			::PostMessage(GetParent()->m_hWnd, WM_KEYDOWN, 27, 0);

			return TRUE;
		}
	}
	return CDialog::PreTranslateMessage(pMsg);
}

void CMenuDlg::OnMenu332783Devctrl()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOG_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnMenu332784TourScan()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOG_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);

	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnMenu332785UpDownload()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(DEV_CODE_PARAM, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOG_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);

	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnMenu332793Codeparam()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CODE_PARAM, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOG_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);

	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnMenu3Localrecord()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CODE_PARAM, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOG_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);

	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnMenu332796Fileload()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CODE_PARAM, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOG_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);

	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnMenu332804Voice()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOG_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CODE_PARAM, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);

	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnMenu332806DevConfig()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOG_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CODE_PARAM, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_CHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnMenu332822Snap()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CODE_PARAM, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_SHOW);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_HIDE);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_UNCHECKED | MF_BYCOMMAND);

	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_CHECKED | MF_BYCOMMAND);
}


void CMenuDlg::OnMenu332848Zoomrect()
{
	// TODO: 在此添加命令处理程序代码
	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CTRL_DLGEX, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(UP_DOWN_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CODE_PARAM, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_LOCAL_RECORD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_FILE_LOAD, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_VOICE_CTRL, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_CONFIG, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_SNAP, SW_HIDE);
	pNetSDKDemoDlg->SetViewWnd(DEV_PLAY_WND, SW_SHOW);
	m_menu3.CheckMenuItem(ID_MENU3_32848_ZOOMRECT, MF_CHECKED | MF_BYCOMMAND);

	m_menu3.CheckMenuItem(ID_MENU3_32783_DEVCTRL, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32784_TOUR_SCAN, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32785_UP_DOWNLOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32793_CODEPARAM, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_LOCALRECORD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32796_FILELOAD, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32804_VOICE, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32806_DEV_CONFIG, MF_UNCHECKED | MF_BYCOMMAND);
	m_menu3.CheckMenuItem(ID_MENU3_32822_SNAP, MF_UNCHECKED | MF_BYCOMMAND);
}

void CMenuDlg::OnBnClickedBtnPlayloop()
{
	// TODO: 在此添加控件通知处理程序代码
	// 指定轮询窗口
	CString strElapseText;
	m_ctlLoopElapse.GetWindowText(strElapseText);

	CNetSDKDemoDlg *pNetSDKDemoDlg = (CNetSDKDemoDlg *)GetParent();
	HWND hPlayWnd;

	CString strLoopText;
	m_ctlLoopBtn.GetWindowText(strLoopText);
	if (strLoopText.Compare("启动轮巡") == 0)
	{
		if (pNetSDKDemoDlg && pNetSDKDemoDlg->m_pWndDevList)
		{
			//pNetSDKDemoDlg->m_pWndDevList->LoopPlay(1, hPlayWnd, atoi(strElapseText));
			pNetSDKDemoDlg->m_pWndDevList->LoopPlay(1, 0, atoi(strElapseText));
			m_ctlLoopBtn.SetWindowText("关闭轮巡");
		}

	}
	else
	{
		if (pNetSDKDemoDlg && pNetSDKDemoDlg->m_pWndDevList)
		{
			pNetSDKDemoDlg->m_pWndDevList->LoopPlay(0, NULL, 0);
			m_ctlLoopBtn.SetWindowText("启动轮巡");
		}
	}

}

void CMenuDlg::OnCbnEditchangeCbLoop()
{
	// TODO: 在此添加控件通知处理程序代码
	CString strElapseText;
	m_ctlLoopElapse.GetWindowText(strElapseText);
	if (atoi(strElapseText)<1)
	{
		AfxMessageBox("轮询时间必须是1-60秒！！");

		m_ctlLoopElapse.SetWindowText(_T("1"));
		return ;
	}
	else if (atoi(strElapseText) > 60)
	{
		AfxMessageBox("轮询时间必须是1-60秒！！");

		m_ctlLoopElapse.SetWindowText(_T("60"));
		return ;
	}
}
