SmsManager/DLG_K_GZMSG_SEE.cpp

101 lines
2.1 KiB
C++
Raw Normal View History

2025-01-14 10:46:18 +08:00
// DLG_K_GZMSG_SEE.cpp : implementation file
//
#include "stdafx.h"
#include "smsmanager.h"
#include "DLG_K_GZMSG_SEE.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// DLG_K_GZMSG_SEE dialog
DLG_K_GZMSG_SEE::DLG_K_GZMSG_SEE(CWnd* pParent /*=NULL*/)
: CDialog(DLG_K_GZMSG_SEE::IDD, pParent)
{
//{{AFX_DATA_INIT(DLG_K_GZMSG_SEE)
m_strGZ = _T("");
m_strMon = _T("");
m_strName = _T("");
m_strYJ = _T("");
//}}AFX_DATA_INIT
m_bModify = false;
m_fYJ = 0;
m_fGZ = 0;
}
void DLG_K_GZMSG_SEE::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DLG_K_GZMSG_SEE)
DDX_Text(pDX, IDD_K_GZMSG_MODIFY_GZ, m_strGZ);
DDV_MaxChars(pDX, m_strGZ, 10);
DDX_Text(pDX, IDD_K_GZMSG_MODIFY_MON, m_strMon);
DDX_Text(pDX, IDD_K_GZMSG_MODIFY_NAME, m_strName);
DDX_Text(pDX, IDD_K_GZMSG_MODIFY_YJ, m_strYJ);
DDV_MaxChars(pDX, m_strYJ, 10);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DLG_K_GZMSG_SEE, CDialog)
//{{AFX_MSG_MAP(DLG_K_GZMSG_SEE)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLG_K_GZMSG_SEE message handlers
BOOL DLG_K_GZMSG_SEE::OnInitDialog()
{
CDialog::OnInitDialog();
m_strName = m_strName2;
m_strMon = m_strMon2;
m_strYJ = m_strYJ2;
m_strGZ = m_strGZ2;
UpdateData(false);
if ( m_bModify )
{
((CEdit * )GetDlgItem(IDD_K_GZMSG_MODIFY_YJ))->SetReadOnly(false);
((CEdit * )GetDlgItem(IDD_K_GZMSG_MODIFY_GZ))->SetReadOnly(false);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void DLG_K_GZMSG_SEE::OnOK()
{
if ( m_bModify )
{
if ( !UpdateData(true) )
return ;
m_fYJ = _tstof(m_strYJ);
m_fGZ = _tstof(m_strGZ);
}
CDialog::OnOK();
}
void DLG_K_GZMSG_SEE::SetParam(BOOL bModify , CString strName, CString strMon, CString strYJ, CString strGZ)
{
m_bModify = bModify;
m_strName2 = strName;
m_strMon2 = strMon;
m_strYJ2 = strYJ;
m_strGZ2 = strGZ;
}