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