AyaNova CE Archive added as recovered from storage during attempt to upgrade a customer from v1.7 to v8!
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
// GetStringDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "sp.h"
|
||||
#include "GetStringDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGetStringDlg dialog
|
||||
|
||||
|
||||
CGetStringDlg::CGetStringDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CGetStringDlg::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CGetStringDlg)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CGetStringDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CGetStringDlg)
|
||||
DDX_Control(pDX, IDC_LBLPROMPT, m_lblPrompt);
|
||||
DDX_Control(pDX, IDC_EDSTRING, m_edString);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CGetStringDlg, CDialog)
|
||||
//{{AFX_MSG_MAP(CGetStringDlg)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGetStringDlg message handlers
|
||||
|
||||
//Prompt=prompting string, pstrReturn=default and return string
|
||||
void CGetStringDlg::Setup(CString prompt, CString *pstrReturn)
|
||||
{
|
||||
if(prompt.IsEmpty())
|
||||
m_strPrompt="Enter text:";
|
||||
else
|
||||
m_strPrompt=prompt;
|
||||
|
||||
m_pstrReturn=pstrReturn;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//**************************************
|
||||
BOOL CGetStringDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
m_lblPrompt.SetWindowText(m_strPrompt);
|
||||
m_edString.SetWindowText(*m_pstrReturn);
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//*************************************
|
||||
void CGetStringDlg::OnCancel()
|
||||
{
|
||||
|
||||
CDialog::OnCancel();
|
||||
}
|
||||
|
||||
|
||||
//*************************************
|
||||
void CGetStringDlg::OnOK()
|
||||
{
|
||||
CString str;
|
||||
str.Empty();
|
||||
m_edString.GetWindowText(str);
|
||||
if(str.IsEmpty())
|
||||
CDialog::OnCancel();
|
||||
else
|
||||
{
|
||||
*m_pstrReturn=str;
|
||||
CDialog::OnOK();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user