12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- // SelWaiter2.cpp : implementation file
- //
- #include "stdafx.h"
- #include "LYFZIPManage.h"
- #include "SelWaiter2.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // SelWaiter2 dialog
- SelWaiter2::SelWaiter2(CWnd* pParent /*=NULL*/)
- : CDialog(SelWaiter2::IDD, pParent)
- {
- //{{AFX_DATA_INIT(SelWaiter2)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void SelWaiter2::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(SelWaiter2)
- DDX_Control(pDX, IDC_COMBOwaiter2, m_combowaiter2);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(SelWaiter2, CDialog)
- //{{AFX_MSG_MAP(SelWaiter2)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // SelWaiter2 message handlers
- BOOL SelWaiter2::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- for(int i=0; i<g_userarray.GetSize (); i++)
- {
- m_combowaiter2.AddString (g_userarray.ElementAt (i).ElementAt (1));
- }
- int pos=m_combowaiter2.FindString (0, waiter2);
- if(pos==-1)
- {
- m_combowaiter2.InsertString (0, waiter2);
- m_combowaiter2.SetCurSel (0);
- }
- else
- m_combowaiter2.SetCurSel (pos);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void SelWaiter2::OnOK()
- {
- // TODO: Add extra validation here
- int pos=m_combowaiter2.GetCurSel ();
- if(pos!=-1)
- {
- m_combowaiter2.GetLBText (pos, waiter2);
- }
- CDialog::OnOK();
- }
|