// DLG_YJ.cpp : implementation file // #include "stdafx.h" #include "corpsms.h" #include "DLG_YJ.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // DLG_YJ dialog DLG_YJ::DLG_YJ(CWnd* pParent,const TCHAR * pType /*=NULL*/) : CDialog(DLG_YJ::IDD, pParent) { //{{AFX_DATA_INIT(DLG_YJ) m_strBZ = _T(""); m_strEmail = _T(""); m_strName = _T(""); m_strTel = _T(""); m_strType = _T(""); m_strS1 = _T(""); //}}AFX_DATA_INIT m_strType2 = pType; } void DLG_YJ::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(DLG_YJ) DDX_Text(pDX, IDC_YJ_BZ, m_strBZ); DDV_MaxChars(pDX, m_strBZ, 510); DDX_Text(pDX, IDC_YJ_EMAIL, m_strEmail); DDV_MaxChars(pDX, m_strEmail, 62); DDX_Text(pDX, IDC_YJ_NAME, m_strName); DDV_MaxChars(pDX, m_strName, 30); DDX_Text(pDX, IDC_YJ_TEL, m_strTel); DDV_MaxChars(pDX, m_strTel, 30); DDX_CBString(pDX, IDC_YJ_TYPE, m_strType); DDV_MaxChars(pDX, m_strType, 60); DDX_Text(pDX, IDC_YJ_S1, m_strS1); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(DLG_YJ, CDialog) //{{AFX_MSG_MAP(DLG_YJ) ON_CBN_SELCHANGE(IDC_YJ_TYPE, OnSelchangeYjType) //}}AFX_MSG_MAP ON_BN_CLICKED(IDOK, &DLG_YJ::OnBnClickedOk) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // DLG_YJ message handlers BOOL DLG_YJ::OnInitDialog() { CDialog::OnInitDialog(); #ifdef MOBSET_OEM m_strS1 = _T(" Ϊ�˴������ĸ��÷�չ�������Ա��������κ�����������Ͷ�߶���ֱ����д���±���\r\n\r\n �뾡�����������������������յ��˱���ᾡ�촦������ʱ�ظ���\r\n\r\n"); #else m_strS1 = _T(" Ϊ�˴������ĸ��÷�չ�������Ա��������κ�����������Ͷ�߶���ֱ����д���±���\r\n\r\n �뾡�����������������������յ��˱���ᾡ�촦������ʱ�ظ���\r\n\r\n �ͷ��绰��400-111-0168��"); #endif UpdateData(false); OnSelchangeYjType(); m_strType = m_strType2; UpdateData(false); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void DLG_YJ::OnSelchangeYjType() { if ( !UpdateData(true) ) return ; CString strTemp; if ( m_strType == _T("��ֵ") ) { MessageBox( _T("��ѡ����\"��ֵ\"���Ҫ��\"˵��\"һ��������ָ������Ϣ��") , _T("��ʾ") , MB_ICONINFORMATION ); strTemp = _T("�������У�\r\n�����ʺ�:\r\n������:\r\n"); } if ( m_strType == _T("����ķ�������") ) { MessageBox( _T("��ѡ����\"����ķ�������\"���Ҫ��\"˵��\"һ��������ָ������Ϣ��") , _T("��ʾ"), MB_ICONINFORMATION ); strTemp = _T("�ύ�ٶȸ�Ϊ��\r\n�Ƿ���Ҫ�Զ��ط�:\r\n"); } if ( m_strType == _T("�����ǩ��") ) { MessageBox( _T("��ѡ����\"�����ǩ��\"���Ҫ��\"˵��\"һ��������ָ������Ϣ��") , _T("��ʾ") , MB_ICONINFORMATION ); strTemp = _T("�µ�ǩ��Ϊ:\r\n\r\n(ǩ����ʽ������+��ҵ���)"); } //if ( strTemp.GetLength()>0 ) { m_strBZ = strTemp; } UpdateData(false); } void DLG_YJ::OnBnClickedOk() { if ( !UpdateData(true) ) return ; if ( m_strBZ.GetLength()<=0 ) { MessageBox( _T("�����������ݺ��ٰ��ύ��") , _T("����") ,MB_ICONWARNING ); return ; } UpdateData(false); CDialog::OnOK(); }