// PortDlg.cpp : implementation file // #include "stdafx.h" #include "dclient.h" #include "PortDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CPortDlg dialog CPortDlg::CPortDlg(CWnd* pParent /*=NULL*/) : CDialog(CPortDlg::IDD, pParent) { //{{AFX_DATA_INIT(CPortDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void CPortDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPortDlg) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CPortDlg, CDialog) //{{AFX_MSG_MAP(CPortDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CPortDlg message handlers void CPortDlg::OnOK() { BOOL Trans=FALSE; m_lPort = GetDlgItemInt(IDC_EDIT1, &Trans, FALSE); if(!Trans) m_lPort = 1000; //default; CDialog::OnOK(); } BOOL CPortDlg::OnInitDialog() { CDialog::OnInitDialog(); SetDlgItemInt(IDC_EDIT1, 1000, FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }