12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- // SelProvider.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ylgl.h"
- #include "SelProvider.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // SelProvider dialog
- SelProvider::SelProvider(CWnd* pParent /*=NULL*/)
- : CDialog(SelProvider::IDD, pParent)
- {
- //{{AFX_DATA_INIT(SelProvider)
- // NOTE: the ClassWizard will add member initialization here
- m_pArray=NULL;
- m_mode=0;
- //}}AFX_DATA_INIT
- }
- void SelProvider::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(SelProvider)
- DDX_Control(pDX, IDC_COMBOprovider, m_comboprovider);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(SelProvider, CDialog)
- //{{AFX_MSG_MAP(SelProvider)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // SelProvider message handlers
- BOOL SelProvider::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- if(m_mode==1)
- {
- SetWindowText("¾°µãÑ¡Ôñ");
- GetDlgItem(IDC_STATIC1)->SetWindowText("¾°µã:");
- m_comboprovider.AddString ("È«²¿");
- CString temp;
- for(int i=0; i<m_pArray->GetSize (); i++)
- {
- temp=m_pArray->ElementAt (i);
- temp.TrimRight ("\\");
- temp=temp.Right (temp.GetLength ()-temp.ReverseFind ('\\')-1);
- m_comboprovider.AddString (temp);
- }
- m_comboprovider.SetCurSel (0);
- }
- else
- {
- for(int i=0; i<g_List1array.GetSize (); i++)
- m_comboprovider.AddString ("ÒÑ·¢"+g_List1array.ElementAt (i).ElementAt (1));
- }
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void SelProvider::OnOK()
- {
- // TODO: Add extra validation here
- int pos=m_comboprovider.GetCurSel ();
- if(pos==-1)return;
- m_comboprovider.GetLBText (pos, m_provider);
- CDialog::OnOK();
- }
|