1 /*M///////////////////////////////////////////////////////////////////////////////////////
\r
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
\r
5 // By downloading, copying, installing or using the software you agree to this license.
\r
6 // If you do not agree to this license, do not download, install,
\r
7 // copy or use the software.
\r
10 // Intel License Agreement
\r
11 // For Open Source Computer Vision Library
\r
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
\r
14 // Third party copyrights are property of their respective owners.
\r
16 // Redistribution and use in source and binary forms, with or without modification,
\r
17 // are permitted provided that the following conditions are met:
\r
19 // * Redistribution's of source code must retain the above copyright notice,
\r
20 // this list of conditions and the following disclaimer.
\r
22 // * Redistribution's in binary form must reproduce the above copyright notice,
\r
23 // this list of conditions and the following disclaimer in the documentation
\r
24 // and/or other materials provided with the distribution.
\r
26 // * The name of Intel Corporation may not be used to endorse or promote products
\r
27 // derived from this software without specific prior written permission.
\r
29 // This software is provided by the copyright holders and contributors "as is" and
\r
30 // any express or implied warranties, including, but not limited to, the implied
\r
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
\r
32 // In no event shall the Intel Corporation or contributors be liable for any direct,
\r
33 // indirect, incidental, special, exemplary, or consequential damages
\r
34 // (including, but not limited to, procurement of substitute goods or services;
\r
35 // loss of use, data, or profits; or business interruption) however caused
\r
36 // and on any theory of liability, whether in contract, strict liability,
\r
37 // or tort (including negligence or otherwise) arising in any way out of
\r
38 // the use of this software, even if advised of the possibility of such damage.
\r
40 //M*/// PTOptions.cpp : implementation file
\r
44 #include "stereogr.h"
\r
45 #include "PTOptions.h"
\r
48 #define new DEBUG_NEW
\r
50 static char THIS_FILE[] = __FILE__;
\r
53 /////////////////////////////////////////////////////////////////////////////
\r
54 // CPTOptions property page
\r
56 IMPLEMENT_DYNCREATE(CPTOptions, CPropertyPage)
\r
58 CPTOptions::CPTOptions() : CPropertyPage(CPTOptions::IDD)
\r
60 //{{AFX_DATA_INIT(CPTOptions)
\r
61 m_checkContours = FALSE;
\r
62 m_depthThresh = 0.0f;
\r
63 m_diffThresh = 0.0f;
\r
64 m_dispThresh = 0.0f;
\r
72 CPTOptions::~CPTOptions()
\r
76 void CPTOptions::DoDataExchange(CDataExchange* pDX)
\r
78 CPropertyPage::DoDataExchange(pDX);
\r
79 //{{AFX_DATA_MAP(CPTOptions)
\r
80 DDX_Check(pDX, IDC_CHECKCONTOUR, m_checkContours);
\r
81 DDX_Text(pDX, IDC_DEPTHTHRESH, m_depthThresh);
\r
82 DDX_Text(pDX, IDC_DIFFTHRESH, m_diffThresh);
\r
83 DDX_Text(pDX, IDC_DISPHRESH, m_dispThresh);
\r
84 DDX_Text(pDX, IDC_PTMAXDISP, m_maxDisp);
\r
85 DDX_Text(pDX, IDC_PTMINDISP, m_minDisp);
\r
90 BEGIN_MESSAGE_MAP(CPTOptions, CPropertyPage)
\r
91 //{{AFX_MSG_MAP(CPTOptions)
\r
95 /////////////////////////////////////////////////////////////////////////////
\r
96 // CPTOptions message handlers
\r
98 #define GET_CONTROL(t, o, r) t* o = (t*)GetDlgItem((r));
\r
99 BOOL CPTOptions::OnInitDialog()
\r
101 CPropertyPage::OnInitDialog();
\r
103 GET_CONTROL(CComboBox, pStereoRes, IDC_PTSTEREORES);
\r
104 GET_CONTROL(CComboBox, pRawRes, IDC_PTRAWRES);
\r
106 pStereoRes->SetCurSel(m_stereoRes);
\r
107 pRawRes->SetCurSel(m_rawRes);
\r
109 return TRUE; // return TRUE unless you set the focus to a control
\r
110 // EXCEPTION: OCX Property Pages should return FALSE
\r
113 void CPTOptions::OnOK()
\r
115 GET_CONTROL(CComboBox, pStereoRes, IDC_PTSTEREORES);
\r
116 GET_CONTROL(CComboBox, pRawRes, IDC_PTRAWRES);
\r
118 m_stereoRes = pStereoRes->GetCurSel();
\r
119 m_rawRes = pRawRes->GetCurSel();
\r
121 CPropertyPage::OnOK();
\r