ConnectDlg.cpp
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:1k
- // ConnectDlg.cpp : implementation file
- //
- #include "stdafx.h"
- //#include "mtmdi.h"
- #include "ConnectDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- char AddressIp[80];
- /////////////////////////////////////////////////////////////////////////////
- // CConnectDlg dialog
- CConnectDlg::CConnectDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CConnectDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CConnectDlg)
- //}}AFX_DATA_INIT
- }
- void CConnectDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CConnectDlg)
- DDX_Control(pDX, IDC_IPADDRESS1, m_SenderIp);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CConnectDlg, CDialog)
- //{{AFX_MSG_MAP(CConnectDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CConnectDlg message handlers
- void CConnectDlg::OnOK()
- {
- // TODO: Add extra validation here
- BYTE bit1,bit2,bit3,bit4;
- m_SenderIp.GetAddress(bit1,bit2,bit3,bit4);
- sprintf(AddressIp, "%d.%d.%d.%d", bit1,bit2,bit3,bit4);
- CDialog::OnOK();
- }