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

📄 serveconter.cpp

📁 使用短信猫可以实现短信的群发
💻 CPP
字号:
// ServeConter.cpp : implementation file
//

#include "stdafx.h"
#include "sms.h"
#include "ServeConter.h"

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

extern CSMSApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CServeConter dialog


CServeConter::CServeConter(CWnd* pParent /*=NULL*/)
	: CDialog(CServeConter::IDD, pParent)
{
	//{{AFX_DATA_INIT(CServeConter)
	m_CMPhoneNumber = _T("");
	m_UMPhoneNumber = _T("");
	//}}AFX_DATA_INIT
}


void CServeConter::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CServeConter)
	DDX_Control(pDX, IDC_CM_RADIO, m_ChooseRadio);
	DDX_CBString(pDX, IDC_CM_PHONE_NUMBER, m_CMPhoneNumber);
	DDX_CBString(pDX, IDC_UM_PHONE_NUMBER, m_UMPhoneNumber);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CServeConter, CDialog)
	//{{AFX_MSG_MAP(CServeConter)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CServeConter message handlers

void CServeConter::OnOK() 
{
	// TODO: Add extra validation here
	int chooseItem=m_ChooseRadio.GetCheck();//返回当前单选钮组中选中项
	TRACE("%d\n",chooseItem);
	//////////////////////////////////////////////////////////////////////////
	//注意 这里单选钮组组长的组中编号为该组成员个数减1,编号从0开始算的
	if(chooseItem==1)
	{
		theApp.m_ServeCenterNumber="8613800591500";
	}
	else
	{
		theApp.m_ServeCenterNumber="8613010381500";
	}
	CDialog::OnOK();
}

BOOL CServeConter::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	UpdateData();
	m_CMPhoneNumber="8613800591500";
	m_UMPhoneNumber="8613010381500";
	UpdateData(FALSE);
	if("8613800591500"==theApp.m_ServeCenterNumber)
	{
		m_ChooseRadio.SetCheck(1);
	}
	else
	{
		m_ChooseRadio.SetCheck(2);
	}

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}


BOOL CServeConter::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	if (pMsg->message == WM_KEYDOWN)
	{	
		if (pMsg->wParam == VK_RETURN)	return TRUE;
		if (pMsg->wParam == VK_ESCAPE)	return TRUE;
	} 
	return CDialog::PreTranslateMessage(pMsg);
}

⌨️ 快捷键说明

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