// AutoZoneOptions.cpp : implementation file // #include "stdafx.h" #include "msvc5ocr.h" #include "AutoZoneOptions.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CAutoZoneOptions dialog CAutoZoneOptions::CAutoZoneOptions(ILEADRasterDocument* pLRasterDoc, CWnd* pParent /*=NULL*/) : CDialog(CAutoZoneOptions::IDD, pParent) { EnableAutomation(); //{{AFX_DATA_INIT(CAutoZoneOptions) // NOTE: the ClassWizard will add member initialization here m_bForceSingleColumn = FALSE; m_bShowGridLines = FALSE; //}}AFX_DATA_INIT m_pLRasterDoc = pLRasterDoc; } void CAutoZoneOptions::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAutoZoneOptions) // NOTE: the ClassWizard will add DDX and DDV calls here DDX_Control(pDX, IDC_CHK_GRID_LINES, m_chkShowGrid); DDX_Control(pDX, IDC_CHK_FORCE_SINGLE_COL, m_chkForceCol); DDX_Control(pDX, IDC_CMB_PAGE_PARSER, m_cmbParser); DDX_Check(pDX, IDC_CHK_FORCE_SINGLE_COL, m_bForceSingleColumn); DDX_Check(pDX, IDC_CHK_GRID_LINES, m_bShowGridLines); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAutoZoneOptions, CDialog) //{{AFX_MSG_MAP(CAutoZoneOptions) // NOTE: the ClassWizard will add message map macros here //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAutoZoneOptions message handlers BOOL CAutoZoneOptions::OnInitDialog() { CDialog::OnInitDialog(); m_cmbParser.AddString(_TEXT("Auto")); m_cmbParser.AddString(_TEXT("Legacy")); m_cmbParser.AddString(_TEXT("Standard")); m_cmbParser.AddString(_TEXT("Fast")); m_cmbParser.SetItemData(0, PARSER_AUTO); m_cmbParser.SetItemData(1, PARSER_LEGACY); m_cmbParser.SetItemData(2, PARSER_STANDARD); m_cmbParser.SetItemData(3, PARSER_FAST); m_cmbParser.SetCurSel((int)m_pLRasterDoc->ZoneParser); m_chkShowGrid.SetCheck(m_pLRasterDoc->ShowZoneGridLines); m_chkForceCol.SetCheck(m_pLRasterDoc->EnableZoneForceSingleColumn); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CAutoZoneOptions::OnOK() { UpdateData(); m_pLRasterDoc->ZoneParser = (PAGE_PARSER)m_cmbParser.GetItemData(m_cmbParser.GetCurSel()); m_pLRasterDoc->ShowZoneGridLines = m_bShowGridLines; m_pLRasterDoc->EnableZoneForceSingleColumn = m_bForceSingleColumn; CDialog::OnOK(); }