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

📄 dialogsetmode.cpp

📁 一个canbus通讯软件源代码
💻 CPP
字号:
// DialogSetMode.cpp : implementation file
//

#include "stdafx.h"
#include "test.h"
#include "DialogSetMode.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDialogSetMode dialog


CDialogSetMode::CDialogSetMode(CWnd* pParent /*=NULL*/)
	: CDialog(CDialogSetMode::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDialogSetMode)
	m_nInterval = 0;
	m_nSetMode = -1;
	//}}AFX_DATA_INIT
}


void CDialogSetMode::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialogSetMode)
	DDX_Text(pDX, IDC_EDIT1, m_nInterval);
	DDX_Radio(pDX, IDC_RADIO_SETMODE, m_nSetMode);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDialogSetMode, CDialog)
	//{{AFX_MSG_MAP(CDialogSetMode)
	ON_BN_CLICKED(IDC_RADIO_SETMODE, OnRadioSetmode)
	ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialogSetMode message handlers

void CDialogSetMode::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(true);
	CDialog::OnOK();
}

void CDialogSetMode::Serialize(CArchive& ar) 
{
	if (ar.IsStoring())
	{	// storing code
	  // ar<<m_nInterval<<m_nSetMode;
	}
	else
	{	// loading code
		//ar>>m_nInterval>>m_nSetMode;
	}
//	UpdateData(false);
}

BOOL CDialogSetMode::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	UpdateData(TRUE);
	if (m_nSetMode==1)
	{
		GetDlgItem(IDC_EDIT1)->EnableWindow(false);
	}
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

//DEL void CDialogSetMode::OnButton1() 
//DEL {
//DEL UpdateData(TRUE);	// TODO: Add your control notification handler code here
//DEL 	
//DEL }

void CDialogSetMode::OnRadioSetmode() 
{
	// TODO: Add your control notification handler code here
		GetDlgItem(IDC_EDIT1)->EnableWindow(true);
}

void CDialogSetMode::OnRadio2() 
{
	// TODO: Add your control notification handler code here
	GetDlgItem(IDC_EDIT1)->EnableWindow(false);
}

⌨️ 快捷键说明

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