1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- // 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();
- }
|