// Dlg_SystemCfg.cpp : 实现文件 // #include "stdafx.h" #include "StoneU_HW_OCX.h" #include "Dlg_SystemCfg.h" #include ".\dlg_systemcfg.h" #include "Dlg_AddDvr.h" #include "Global.h" // CDlg_SystemCfg 对话框 IMPLEMENT_DYNAMIC(CDlg_SystemCfg, CDialog) CDlg_SystemCfg::CDlg_SystemCfg(CWnd* pParent /*=NULL*/) : CDialog(CDlg_SystemCfg::IDD, pParent) { } CDlg_SystemCfg::~CDlg_SystemCfg() { } void CDlg_SystemCfg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_TREE1, m_treeall); DDX_Control(pDX, IDC_TREE2, m_treesel); } BEGIN_MESSAGE_MAP(CDlg_SystemCfg, CDialog) ON_BN_CLICKED(IDC_LOGIN, OnBnClickedLogin) END_MESSAGE_MAP() // CDlg_SystemCfg 消息处理程序 BOOL CDlg_SystemCfg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: 在此添加额外的初始化 return TRUE; // return TRUE unless you set the focus to a control // 异常: OCX 属性页应返回 FALSE } void CDlg_SystemCfg::OnBnClickedLogin() { for(int i = 0; i < MAXIPNUMBER; i++) { if(g_Serverinfo[i].m_iServerChannelNumber == -1) { CDlg_AddDvr dlg; dlg.m_iServerNum = i; dlg.DoModal(); if(dlg.m_bChanged) { //F_IniTreeall(); } return; } } MessageBox("超过最大服务器数,请先删除再添加!", "温馨提示", MB_ICONINFORMATION); }