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

📄 noteset.cpp

📁 书友会短信发送系统由基础信息模块、短信管理模块、短信投票模块、系统管理模块等几部分组成。
💻 CPP
字号:
// NoteSet.cpp : implementation file
//

#include "stdafx.h"
#include "BookFriend.h"
#include "NoteSet.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNoteSet dialog


CNoteSet::CNoteSet(CWnd* pParent /*=NULL*/)
	: CDialog(CNoteSet::IDD, pParent)
{
	//{{AFX_DATA_INIT(CNoteSet)
	m_Port = _T("");
	m_Baud = _T("");
	m_MerID = _T("");
	m_AccrEdit = _T("");
	//}}AFX_DATA_INIT
}


void CNoteSet::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CNoteSet)
	DDX_Text(pDX, IDC_EDIT1, m_Port);
	DDX_Text(pDX, IDC_EDIT2, m_Baud);
	DDX_Text(pDX, IDC_EDIT3, m_MerID);
	DDX_Text(pDX, IDC_EDIT4, m_AccrEdit);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CNoteSet, CDialog)
	//{{AFX_MSG_MAP(CNoteSet)
	ON_BN_CLICKED(IDC_BUTGET, OnButget)
	ON_BN_CLICKED(IDC_BUTSAVE, OnButsave)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNoteSet message handlers

void CNoteSet::OnButget() 
{
	// TODO: Add your control notification handler code here
	m_MerID.Format("%s",GSMModemGetSnInfoNew(NULL,NULL));
	m_Baud.Format("%s",GSMModemGetBaudrate());
	m_Port.Format("%s",GSMModemGetDevice());	
	UpdateData(FALSE);
}

void CNoteSet::OnButsave() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
	WritePrivateProfileString("短信猫设置","端口号",m_Port,"./NoteSet.ini");
	WritePrivateProfileString("短信猫设置","波特率",m_Baud,"./NoteSet.ini");
	WritePrivateProfileString("短信猫设置","机器号码",m_MerID,"./NoteSet.ini");
	WritePrivateProfileString("短信猫设置","授权号码",m_AccrEdit,"./NoteSet.ini");
	WritePrivateProfileString("短信猫设置","是否设置","1","./NoteSet.ini");
}

⌨️ 快捷键说明

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