www.pudn.com > AVChat0926.rar > CCallDlg.cpp


// CCallDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "AVChat.h" 
#include "CCallDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CCallDlg dialog 
 
 
CCallDlg::CCallDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CCallDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CCallDlg) 
		// NOTE: the ClassWizard will add member initialization here 
	//}}AFX_DATA_INIT 
	mServerIP = 0xC0A80165; 
} 
 
 
void CCallDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CCallDlg) 
	DDX_Control(pDX, IDC_IPADDRESS_SERVER, mServerIPCtrl); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CCallDlg, CDialog) 
	//{{AFX_MSG_MAP(CCallDlg) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CCallDlg message handlers 
 
BOOL CCallDlg::OnInitDialog()  
{ 
	CDialog::OnInitDialog(); 
	 
	// TODO: Add extra initialization here 
	mServerIPCtrl.SetAddress(mServerIP); 
 
	return TRUE;  // return TRUE unless you set the focus to a control 
	              // EXCEPTION: OCX Property Pages should return FALSE 
} 
 
void CCallDlg::OnOK()  
{ 
	DWORD  ip = 0; 
	if (mServerIPCtrl.GetAddress(ip) == 4) 
	{ 
		mServerIP = ip; 
	} 
	 
	CDialog::OnOK(); 
}