95 lines
2.1 KiB
C++
95 lines
2.1 KiB
C++
// PMViewPrompt.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "sp.h"
|
|
#include "PMViewPrompt.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CPMViewPrompt dialog
|
|
|
|
//RETURNS 0=CANCEL,1=SELECTED, 2=MASTER
|
|
CPMViewPrompt::CPMViewPrompt(CWnd* pParent /*=NULL*/)
|
|
: CDialog(CPMViewPrompt::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(CPMViewPrompt)
|
|
// NOTE: the ClassWizard will add member initialization here
|
|
//}}AFX_DATA_INIT
|
|
m_pnReturn=NULL;
|
|
}
|
|
|
|
BOOL CPMViewPrompt::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
ASSERT(m_pnReturn!=NULL);
|
|
SetWindowText(m_strTitle);
|
|
m_lblPrompt.SetWindowText(m_strPrompt);
|
|
m_btnCancel.SetFocus();
|
|
return FALSE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void CPMViewPrompt::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CPMViewPrompt)
|
|
DDX_Control(pDX, IDCANCEL, m_btnCancel);
|
|
DDX_Control(pDX, IDC_LBLPROMPT, m_lblPrompt);
|
|
DDX_Control(pDX, IDC_BTNSELECTEDONLY, m_btnSelectedOnly);
|
|
DDX_Control(pDX, IDC_BTNMASTER, m_btnMaster);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CPMViewPrompt, CDialog)
|
|
//{{AFX_MSG_MAP(CPMViewPrompt)
|
|
ON_BN_CLICKED(IDC_BTNSELECTEDONLY, OnBtnselectedonly)
|
|
ON_BN_CLICKED(IDC_BTNMASTER, OnBtnmaster)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CPMViewPrompt message handlers
|
|
|
|
void CPMViewPrompt::OnOK()
|
|
{//enter key hack
|
|
}
|
|
|
|
void CPMViewPrompt::OnCancel()
|
|
{
|
|
*m_pnReturn=0;
|
|
|
|
CDialog::OnOK();
|
|
}
|
|
|
|
void CPMViewPrompt::OnBtnselectedonly()
|
|
{
|
|
*m_pnReturn=1;
|
|
CDialog::OnOK();
|
|
|
|
}
|
|
|
|
void CPMViewPrompt::OnBtnmaster()
|
|
{
|
|
*m_pnReturn=2;
|
|
CDialog::OnOK();
|
|
|
|
}
|
|
|
|
|
|
//RETURNS 0=CANCEL,1=SELECTED, 2=MASTER
|
|
void CPMViewPrompt::Setup(/*RETURNS 0=CANCEL,1=SELECTED, 2=MASTER */CString strPrompt, CString strTitle, int * nResult)
|
|
{
|
|
m_strPrompt=strPrompt;
|
|
m_strTitle=strTitle;
|
|
m_pnReturn=nResult;
|
|
|
|
}
|
|
|