connectdialog.cpp

来自「fortran并行计算包」· C++ 代码 · 共 83 行

CPP
83
字号
/* -*- Mode: C; c-basic-offset:4 ; -*- *//* * *  (C) 2001 by Argonne National Laboratory. *      See COPYRIGHT in top-level directory. */// ConnectDialog.cpp : implementation file//#include "stdafx.h"#include "pman_vis.h"#include "ConnectDialog.h"#include ".\connectdialog.h"// CConnectDialog dialogIMPLEMENT_DYNAMIC(CConnectDialog, CDialog)CConnectDialog::CConnectDialog(CWnd* pParent /*=NULL*/)	: CDialog(CConnectDialog::IDD, pParent)	, m_nPort(0)	, m_pszHost(_T(""))	, m_pszMPIPort(_T("")){    m_type = MPI_CONNECT;}CConnectDialog::~CConnectDialog(){}void CConnectDialog::DoDataExchange(CDataExchange* pDX){    CDialog::DoDataExchange(pDX);    DDX_Text(pDX, IDC_PORT, m_nPort);    DDX_Text(pDX, IDC_HOSTNAME, m_pszHost);    DDX_Text(pDX, IDC_MPIPORT, m_pszMPIPort);    DDX_Control(pDX, IDC_MPI_RADIO, m_MPI_Radio);    DDX_Control(pDX, IDC_TCP_RADIO, m_TCP_Radio);    DDX_Control(pDX, IDC_MPIPORT, m_mpi_port_edit);    DDX_Control(pDX, IDC_HOSTNAME, m_host_edit);    DDX_Control(pDX, IDC_PORT, m_port_edit);}BEGIN_MESSAGE_MAP(CConnectDialog, CDialog)    ON_BN_CLICKED(IDC_MPI_RADIO, OnBnClickedMpiRadio)    ON_BN_CLICKED(IDC_TCP_RADIO, OnBnClickedTcpRadio)END_MESSAGE_MAP()// CConnectDialog message handlersvoid CConnectDialog::OnBnClickedMpiRadio(){    m_MPI_Radio.SetCheck(1);    m_TCP_Radio.SetCheck(0);    m_type = MPI_CONNECT;    m_mpi_port_edit.EnableWindow();    m_host_edit.EnableWindow(FALSE);    m_port_edit.EnableWindow(FALSE);}void CConnectDialog::OnBnClickedTcpRadio(){    m_MPI_Radio.SetCheck(0);    m_TCP_Radio.SetCheck(1);    m_type = TCP_CONNECT;    m_mpi_port_edit.EnableWindow(FALSE);    m_host_edit.EnableWindow();    m_port_edit.EnableWindow();}BOOL CConnectDialog::OnInitDialog(){    CDialog::OnInitDialog();    OnBnClickedMpiRadio();    return TRUE;  // return TRUE unless you set the focus to a control    // EXCEPTION: OCX Property Pages should return FALSE}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?