// NominalDlg.cpp : implementation file // #include "stdafx.h" #include "KBEditors.h" #include "General.h" #include "KBEditorsDoc.h" #include "NominalDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CNominalDlg dialog CNominalDlg::CNominalDlg(CWnd* pParent /*=NULL*/) : CDialog(CNominalDlg::IDD, pParent) { //{{AFX_DATA_INIT(CNominalDlg) m_Prompt = _T(""); //}}AFX_DATA_INIT } void CNominalDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CNominalDlg) DDX_Control(pDX, IDC_LIST1, m_LegalValue); DDX_Text(pDX, IDC_Prompt, m_Prompt); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CNominalDlg, CDialog) //{{AFX_MSG_MAP(CNominalDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CNominalDlg message handlers void CNominalDlg::SeeData(CProperty * inProp) { Prop = inProp; } BOOL CNominalDlg::OnInitDialog() { CDialog::OnInitDialog(); CenterWindow(GetDesktopWindow()); m_Prompt = Prop->PromptA; POSITION pos11 = Prop->m_LegalValueList.GetStartPosition(); while (pos11 !=NULL) { CString str11; CString str; Prop->m_LegalValueList.GetNextAssoc(pos11,str,str11); m_LegalValue.AddString(str); } UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CNominalDlg::OnOK() { int Sel = m_LegalValue.GetCurSel(); if (Sel < 0) return; CString str; m_LegalValue.GetText(Sel,str); Val = str; CDialog::OnOK(); }