// ChooseReason.cpp : implementation file // #include "stdafx.h" #include "ylgl.h" #include "ChooseReason.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CChooseReason dialog CChooseReason::CChooseReason(CWnd* pParent /*=NULL*/) : CDialog(CChooseReason::IDD, pParent) { //{{AFX_DATA_INIT(CChooseReason) m_radio1 = 0; //}}AFX_DATA_INIT } void CChooseReason::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CChooseReason) DDX_Control(pDX, IDC_COMBOwaiter1, m_combowaiter1); DDX_Radio(pDX, IDC_RADIO1, m_radio1); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CChooseReason, CDialog) //{{AFX_MSG_MAP(CChooseReason) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CChooseReason message handlers BOOL CChooseReason::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_combowaiter1.RefDroppedWidth(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CChooseReason::OnOK() { // TODO: Add extra validation here UpdateData(); if(m_radio1==0) sRet="¹¤³§"; else { int pos=m_combowaiter1.GetCurSel (); CString m_waiter1; if(pos!=-1) { m_combowaiter1.GetLBText (pos, m_waiter1); } else return; sRet="Ô±¹¤:"+m_waiter1; } CDialog::OnOK(); }