TakeStautsSel.cpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // TakeStautsSel.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "TakeStautsSel.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // TakeStautsSel dialog
  13. TakeStautsSel::TakeStautsSel(CWnd* pParent /*=NULL*/)
  14. : CDialog(TakeStautsSel::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(TakeStautsSel)
  17. m_radio1 = 0;
  18. m_check1 = FALSE;
  19. m_bCheckEnalbe = TRUE;
  20. //m_bCheckbox = FALSE;
  21. //}}AFX_DATA_INIT
  22. }
  23. void TakeStautsSel::DoDataExchange(CDataExchange* pDX)
  24. {
  25. CDialog::DoDataExchange(pDX);
  26. //{{AFX_DATA_MAP(TakeStautsSel)
  27. DDX_Radio(pDX, IDC_RADIO1, m_radio1);
  28. DDX_Check(pDX, IDC_CHECK1, m_check1);
  29. //}}AFX_DATA_MAP
  30. }
  31. BEGIN_MESSAGE_MAP(TakeStautsSel, CDialog)
  32. //{{AFX_MSG_MAP(TakeStautsSel)
  33. //}}AFX_MSG_MAP
  34. ON_BN_CLICKED(IDC_RADIO1, OnBnClickedRadio1)
  35. ON_BN_CLICKED(IDC_RADIO2, OnBnClickedRadio2)
  36. ON_BN_CLICKED(IDC_RADIO9, OnBnClickedRadio9)
  37. END_MESSAGE_MAP()
  38. /////////////////////////////////////////////////////////////////////////////
  39. // TakeStautsSel message handlers
  40. void TakeStautsSel::OnOK()
  41. {
  42. // TODO: Add extra validation here
  43. UpdateData();
  44. CDialog::OnOK();
  45. }
  46. void TakeStautsSel::OnCancel()
  47. {
  48. // TODO: Add extra cleanup here
  49. OnOK();
  50. // CDialog::OnCancel();
  51. }
  52. BOOL TakeStautsSel::OnInitDialog()
  53. {
  54. CDialog::OnInitDialog();
  55. // Jeff.add:禁用复选框;
  56. if ( m_bCheckEnalbe == FALSE)
  57. {
  58. GetDlgItem(IDC_CHECK1)->EnableWindow(FALSE);
  59. }
  60. // TODO: Add extra initialization here
  61. return TRUE; // return TRUE unless you set the focus to a control
  62. // EXCEPTION: OCX Property Pages should return FALSE
  63. }
  64. // void TakeStautsSel::CheckChange(BOOL bCheck)
  65. //{
  66. // ((CButton*)GetDlgItem(IDC_CHECK1))->SetCheck(bCheck);
  67. // UpdateData();
  68. //}
  69. void TakeStautsSel::OnBnClickedRadio1() // 此景点拍照完;
  70. {
  71. //BOOL bCheck = ((CButton*)GetDlgItem(IDC_RADIO1))->SetCheck(bCheck);
  72. // ((CButton*)GetDlgItem(IDC_CHECK1))->SetCheck(bCheck);
  73. }
  74. void TakeStautsSel::OnBnClickedRadio2()
  75. {
  76. //BOOL bCheck = ((CButton*)GetDlgItem(IDC_RADIO2))->SetCheck(bCheck);
  77. ((CButton*)GetDlgItem(IDC_CHECK1))->SetCheck(FALSE);
  78. }
  79. void TakeStautsSel::OnBnClickedRadio9()
  80. {
  81. //BOOL bCheck = ((CButton*)GetDlgItem(IDC_RADIO3))->SetCheck(bCheck);
  82. ((CButton*)GetDlgItem(IDC_CHECK1))->SetCheck(FALSE);
  83. }