Files
ayanova7/archive/ayanova 1.9.4 CE final release db schema 171/sp/GetAllOrXValue.cpp

83 lines
1.8 KiB
C++

// GetAllOrXValue.cpp : implementation file
//
#include "stdafx.h"
#include "sp.h"
#include "GetAllOrXValue.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGetAllOrXValue dialog
CGetAllOrXValue::CGetAllOrXValue(CWnd* pParent /*=NULL*/)
: CDialog(CGetAllOrXValue::IDD, pParent)
{
//{{AFX_DATA_INIT(CGetAllOrXValue)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_plValueReturn=NULL;
}
void CGetAllOrXValue::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGetAllOrXValue)
DDX_Control(pDX, IDC_LBLPROMPT, m_lblPrompt);
DDX_Control(pDX, IDC_EDX, m_edX);
DDX_Control(pDX, IDC_CKALL, m_ckALL);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGetAllOrXValue, CDialog)
//{{AFX_MSG_MAP(CGetAllOrXValue)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGetAllOrXValue message handlers
void CGetAllOrXValue::OnOK()
{
CString str;
if(m_ckALL.GetCheck()==TRUE)
*m_plValueReturn=-1;
else
{
m_edX.GetWindowText(str);
if(str.IsEmpty())
*m_plValueReturn=0;
else
*m_plValueReturn=atol(str);
}
CDialog::OnOK();
}
void CGetAllOrXValue::OnCancel()
{
*m_plValueReturn=0;//indicates cancelled
CDialog::OnCancel();
}
BOOL CGetAllOrXValue::OnInitDialog()
{
CDialog::OnInitDialog();
ASSERT(m_plValueReturn!=NULL);
if(!m_strPrompt.IsEmpty())
m_lblPrompt.SetWindowText(m_strPrompt);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}