// SelBranch.cpp : implementation file // #include "stdafx.h" #include "ylgl.h" #include "SelBranch.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // SelBranch dialog SelBranch::SelBranch(CWnd* pParent /*=NULL*/) : CDialog(SelBranch::IDD, pParent) { //{{AFX_DATA_INIT(SelBranch) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void SelBranch::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(SelBranch) DDX_Control(pDX, IDC_COMBO1, m_combo1); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(SelBranch, CDialog) //{{AFX_MSG_MAP(SelBranch) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // SelBranch message handlers void SelBranch::OnOK() { // TODO: Add extra validation here UpdateData(); int pos=m_combo1.GetCurSel (); if(pos==-1)return; m_combo1.GetLBText (pos, m_sel); CDialog::OnOK(); } BOOL SelBranch::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here for(int i=0; iGetSize (); i++) { m_combo1.AddString (m_pArray->ElementAt (i)); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }