www.gusucode.com > VC++写的中国象棋游戏源程序源码程序 > VC++写的中国象棋游戏源程序源码程序\code\IpAddress.cpp
//Download by http://www.NewXing.com // IpAddress.cpp : implementation file // #include "stdafx.h" #include "chess.h" #include "IpAddress.h" #include "globle.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CIpAddress dialog CIpAddress::CIpAddress(CWnd* pParent /*=NULL*/) : CDialog(CIpAddress::IDD, pParent) { //{{AFX_DATA_INIT(CIpAddress) m_iRed = 0; //}}AFX_DATA_INIT } void CIpAddress::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CIpAddress) DDX_Control(pDX, IDC_IPADDRESS, m_ipAddress); DDX_Radio(pDX, IDC_RED, m_iRed); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CIpAddress, CDialog) //{{AFX_MSG_MAP(CIpAddress) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CIpAddress message handlers void CIpAddress::OnOK() { // TODO: Add extra validation here m_ipAddress.GetAddress(g_dwIPServer); CDialog::OnOK(); } BOOL CIpAddress::OnInitDialog() { CDialog::OnInitDialog(); m_ipAddress.SetAddress(10, 1, 1, 28); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }