SelProvider.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // SelProvider.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "LYFZSendMsg.h"
  5. #include "SelProvider.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // SelProvider dialog
  13. SelProvider::SelProvider(CWnd* pParent /*=NULL*/)
  14. : CDialog(SelProvider::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(SelProvider)
  17. // NOTE: the ClassWizard will add member initialization here
  18. //}}AFX_DATA_INIT
  19. }
  20. void SelProvider::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(SelProvider)
  24. DDX_Control(pDX, IDC_COMBOprovider, m_comboprovider);
  25. //}}AFX_DATA_MAP
  26. }
  27. BEGIN_MESSAGE_MAP(SelProvider, CDialog)
  28. //{{AFX_MSG_MAP(SelProvider)
  29. //}}AFX_MSG_MAP
  30. END_MESSAGE_MAP()
  31. /////////////////////////////////////////////////////////////////////////////
  32. // SelProvider message handlers
  33. BOOL SelProvider::OnInitDialog()
  34. {
  35. CDialog::OnInitDialog();
  36. // TODO: Add extra initialization here
  37. for(int i=0; i<g_List1array.GetSize (); i++)
  38. m_comboprovider.AddString ("ÒÑ·¢"+g_List1array.ElementAt (i).ElementAt (1));
  39. return TRUE; // return TRUE unless you set the focus to a control
  40. // EXCEPTION: OCX Property Pages should return FALSE
  41. }
  42. void SelProvider::OnOK()
  43. {
  44. // TODO: Add extra validation here
  45. int pos=m_comboprovider.GetCurSel ();
  46. if(pos==-1)return;
  47. m_comboprovider.GetLBText (pos, m_provider);
  48. CDialog::OnOK();
  49. }