// InitDeviceDlg.cpp : implementation file
//

#include "stdafx.h"
#include "searchdevice.h"
#include "InitDeviceDlg.h"
#include <CTYPE.H>
#include <string>
#include <iostream>


#pragma warning(disable:4291)
#ifndef NEW
#define NEW new(std::nothrow)
#endif

/////////////////////////////////////////////////////////////////////////////
// CInitDeviceDlg dialog


CInitDeviceDlg::CInitDeviceDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CInitDeviceDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CInitDeviceDlg)
	m_strPwd = _T("");
	m_strRig = _T("");
	m_strUserName = _T("admin");
	m_strPwdRestWay = _T("");
	//}}AFX_DATA_INIT
   // m_byPwdResetWay = -1;
}


void CInitDeviceDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CInitDeviceDlg)
	DDX_Text(pDX, IDC_EDIT_PWD, m_strPwd);
	DDX_Text(pDX, IDC_EDIT_RIG, m_strRig);
	DDX_Text(pDX, IDC_EDIT_UNAME, m_strUserName);
	DDX_Text(pDX, IDC_EDIT_PwdRestWsy, m_strPwdRestWay);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CInitDeviceDlg, CDialog)
	//{{AFX_MSG_MAP(CInitDeviceDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInitDeviceDlg message handlers

BOOL CInitDeviceDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here

    g_SetWndStaticText(this);
  //  m_comboRigWay.SetCurSel(m_byPwdResetWay); 
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CInitDeviceDlg::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE); 
    
    CDialog::OnOK();
}

void CInitDeviceDlg::OnCancel() 
{
	// TODO: Add extra cleanup here
	CDialog::OnCancel();
}

BOOL CInitDeviceDlg::DestroyWindow() 
{
	// TODO: Add your specialized code here and/or call the base class
//	m_bFlag = false;
	return CDialog::DestroyWindow();
}


