⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipchoice.cpp

📁 nucleus source 源码 全部源码
💻 CPP
字号:
// IPChoice.cpp : implementation file
//

#include "stdafx.h"
#include "WinDemo.h"
#include "IPChoice.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CIPChoice dialog

int ChoiceIP = 0;

CIPChoice::CIPChoice(CWnd* pParent /*=NULL*/)
	: CDialog(CIPChoice::IDD, pParent)
{
	//{{AFX_DATA_INIT(CIPChoice)
	//}}AFX_DATA_INIT
}


void CIPChoice::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CIPChoice)
	DDX_Control(pDX, IDC_AutoIP, m_AutoIP);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CIPChoice, CDialog)
	//{{AFX_MSG_MAP(CIPChoice)
	ON_BN_CLICKED(IDC_AutoIP, OnAutoIP)
	ON_BN_CLICKED(IDC_GiveIP, OnGiveIP)
	ON_BN_CLICKED(IDC_Cancel, OnCancel)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CIPChoice message handlers

void CIPChoice::OnOK() 
{
	// TODO: Add extra validation here

    if (ChoiceIP != 2)
        ChoiceIP = 1;
	
	CDialog::OnOK();
}

void CIPChoice::OnAutoIP() 
{
	// TODO: Add your control notification handler code here
	ChoiceIP = 1;
}

void CIPChoice::OnGiveIP() 
{
	// TODO: Add your control notification handler code here
	ChoiceIP = 2;
}

int CIPChoice::DoModal() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::DoModal();
}

void CIPChoice::OnCancel() 
{
	CDialog::OnCancel();
}

BOOL CIPChoice::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
    m_AutoIP.SetCheck(1);
	
	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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -