www.pudn.com > JingXiang-Design-Jeff.rar > For_Detecting_Area_Select.cpp


// For_Detecting_Area_Select.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "Design.h" 
#include "For_Detecting_Area_Select.h" 
#include "MainFrm.h" 
#include "DesignDoc.h" 
#include "DesignView.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// For_Detecting_Area_Select dialog 
 
 
For_Detecting_Area_Select::For_Detecting_Area_Select(CWnd* pParent /*=NULL*/) 
	: CDialog(For_Detecting_Area_Select::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(For_Detecting_Area_Select) 
	m_Detecting_Area = -1; 
	//}}AFX_DATA_INIT 
} 
 
 
void For_Detecting_Area_Select::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(For_Detecting_Area_Select) 
	DDX_Radio(pDX, IDC_RADIO1, m_Detecting_Area); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(For_Detecting_Area_Select, CDialog) 
	//{{AFX_MSG_MAP(For_Detecting_Area_Select) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// For_Detecting_Area_Select message handlers 
 
BOOL For_Detecting_Area_Select::OnInitDialog()  
{ 
	 CDesignView *pDesignView; 
	 CDesignDoc *pDoc; 
	 CMainFrame* pMFrame=(CMainFrame*)(AfxGetApp()->m_pMainWnd); 
      pDesignView=(CDesignView*)pMFrame->GetActiveView(); 
	  pDoc=pDesignView->GetDocument(); 
	  
      this->m_Detecting_Area=pDesignView->pPara_Detect->Detecting_Area; 
	  	 
	 
	CDialog::OnInitDialog(); 
	 
	// 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 For_Detecting_Area_Select::OnOK()  
{ 
 
	 CDesignView *pDesignView; 
	 CDesignDoc *pDoc; 
	 CMainFrame* pMFrame=(CMainFrame*)(AfxGetApp()->m_pMainWnd); 
      pDesignView=(CDesignView*)pMFrame->GetActiveView(); 
	  pDoc=pDesignView->GetDocument(); 
	  UpdateData(TRUE); 
	  pDesignView->pPara_Detect->Detecting_Area=this->m_Detecting_Area; 
	   
	  CDialog::OnOK(); 
 
}