// TakeStautsSel.cpp : implementation file // #include "stdafx.h" #include "ylgl.h" #include "TakeStautsSel.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // TakeStautsSel dialog TakeStautsSel::TakeStautsSel(CWnd* pParent /*=NULL*/) : CDialog(TakeStautsSel::IDD, pParent) { //{{AFX_DATA_INIT(TakeStautsSel) m_radio1 = 0; m_check1 = FALSE; m_bCheckEnalbe = TRUE; //m_bCheckbox = FALSE; //}}AFX_DATA_INIT } void TakeStautsSel::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(TakeStautsSel) DDX_Radio(pDX, IDC_RADIO1, m_radio1); DDX_Check(pDX, IDC_CHECK1, m_check1); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(TakeStautsSel, CDialog) //{{AFX_MSG_MAP(TakeStautsSel) //}}AFX_MSG_MAP ON_BN_CLICKED(IDC_RADIO1, OnBnClickedRadio1) ON_BN_CLICKED(IDC_RADIO2, OnBnClickedRadio2) ON_BN_CLICKED(IDC_RADIO9, OnBnClickedRadio9) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // TakeStautsSel message handlers void TakeStautsSel::OnOK() { // TODO: Add extra validation here UpdateData(); CDialog::OnOK(); } void TakeStautsSel::OnCancel() { // TODO: Add extra cleanup here OnOK(); // CDialog::OnCancel(); } BOOL TakeStautsSel::OnInitDialog() { CDialog::OnInitDialog(); // Jeff.add:禁用复选框; if ( m_bCheckEnalbe == FALSE) { GetDlgItem(IDC_CHECK1)->EnableWindow(FALSE); } // TODO: Add extra initialization here return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } // void TakeStautsSel::CheckChange(BOOL bCheck) //{ // ((CButton*)GetDlgItem(IDC_CHECK1))->SetCheck(bCheck); // UpdateData(); //} void TakeStautsSel::OnBnClickedRadio1() // 此景点拍照完; { //BOOL bCheck = ((CButton*)GetDlgItem(IDC_RADIO1))->SetCheck(bCheck); // ((CButton*)GetDlgItem(IDC_CHECK1))->SetCheck(bCheck); } void TakeStautsSel::OnBnClickedRadio2() { //BOOL bCheck = ((CButton*)GetDlgItem(IDC_RADIO2))->SetCheck(bCheck); ((CButton*)GetDlgItem(IDC_CHECK1))->SetCheck(FALSE); } void TakeStautsSel::OnBnClickedRadio9() { //BOOL bCheck = ((CButton*)GetDlgItem(IDC_RADIO3))->SetCheck(bCheck); ((CButton*)GetDlgItem(IDC_CHECK1))->SetCheck(FALSE); }