📄 testdlg.cpp
字号:
// TestDlg.cpp : implementation file
//
#include "stdafx.h"
#include "hgsmsend.h"
#include "TestDlg.h"
#include"hgsmsendDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// TestDlg dialog
extern CHgsmsendDlg *sgd;
TestDlg::TestDlg(CWnd* pParent /*=NULL*/)
: CDialog(TestDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(TestDlg)
m_message = _T("");
m_phone = _T("");
m_coding = 8;
m_unicode = FALSE;
m_FeeType = 1;
m_graphic=1;
m_FeeValue = _T("10");
//}}AFX_DATA_INIT
}
void TestDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(TestDlg)
DDX_Text(pDX, IDC_EDIT2, m_message);
DDV_MaxChars(pDX, m_message, 300);
DDX_Text(pDX, IDC_EDIT1, m_phone);
DDV_MaxChars(pDX, m_phone, 13);
DDX_Text(pDX, IDC_EDIT3, m_coding);
DDV_MinMaxByte(pDX, m_coding, 0, 255);
DDX_Check(pDX, IDC_CHECK1, m_unicode);
DDX_Text(pDX, IDC_EDIT4, m_FeeType);
DDV_MinMaxByte(pDX, m_FeeType, 0, 128);
DDX_Text(pDX, IDC_EDIT5, m_FeeValue);
DDV_MaxChars(pDX, m_FeeValue, 6);
DDX_Radio(pDX, IDC_RADIO1, m_graphic);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(TestDlg, CDialog)
//{{AFX_MSG_MAP(TestDlg)
ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
ON_BN_CLICKED(IDC_CHECK1, OnCheck1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// TestDlg message handlers
BOOL TestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_phone=sgd->Phone;
m_message=sgd->Message;
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void TestDlg::OnOK()
{
UpdateData(TRUE);
CDialog::OnOK();
}
void TestDlg::OnRadio1()
{
UpdateData(TRUE);
sgd->m_type=m_graphic;
m_coding = 4;
UpdateData(FALSE);
}
void TestDlg::OnRadio2()
{
UpdateData(TRUE);
sgd->m_type=m_graphic;
m_coding = 8;
UpdateData(FALSE);
}
void TestDlg::OnCheck1()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
sgd->m_unicode=m_unicode;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -