ConnectDlg.cpp
资源名称:VC++视频传输.rar [点击查看]
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:1k
源码类别:
VC书籍
开发平台:
Visual C++
- // 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();
- }