1 // Tune.cpp : implementation file
8 #include "AnimationApp.h"
9 #include "Animationdoc.h"
10 #include "AnimationView3D.h"
15 static char THIS_FILE[] = __FILE__;
18 /////////////////////////////////////////////////////////////////////////////
22 CTune::CTune(CWnd* pParent /*=NULL*/)
23 : CDialog(CTune::IDD, pParent)
25 //{{AFX_DATA_INIT(CTune)
32 void CTune::DoDataExchange(CDataExchange* pDX)
34 CDialog::DoDataExchange(pDX);
35 //{{AFX_DATA_MAP(CTune)
36 DDX_Text(pDX, IDC_APPERTURE, m_dAngle);
37 DDV_MinMaxDouble(pDX, m_dAngle, 5., 179.);
38 DDX_Text(pDX, IDC_FOCDIST, m_dFocus);
39 DDV_MinMaxDouble(pDX, m_dFocus, 1.e-003, 10000000.);
44 BEGIN_MESSAGE_MAP(CTune, CDialog)
45 //{{AFX_MSG_MAP(CTune)
46 ON_NOTIFY(UDN_DELTAPOS, IDC_SPINANG, OnDeltaposSpinang)
47 ON_NOTIFY(UDN_DELTAPOS, IDC_SPINFOC, OnDeltaposSpinfoc)
48 ON_EN_CHANGE(IDC_APPERTURE, OnChangeApperture)
49 ON_EN_CHANGE(IDC_FOCDIST, OnChangeFocdist)
53 /////////////////////////////////////////////////////////////////////////////
54 // CTune message handlers
56 void CTune::OnDeltaposSpinang(NMHDR* pNMHDR, LRESULT* pResult)
58 NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
59 // TODO: Add your control notification handler code here
61 if ( pNMUpDown->iDelta > 0 ) {
66 if ( m_dAngle < 178. )
69 UpdateData ( FALSE ) ;
76 void CTune::OnDeltaposSpinfoc(NMHDR* pNMHDR, LRESULT* pResult)
78 NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
79 // TODO: Add your control notification handler code here
81 if ( pNMUpDown->iDelta > 0 ) {
87 UpdateData ( FALSE ) ;
94 void CTune::OnChangeApperture()
96 // TODO: If this is a RICHEDIT control, the control will not
97 // send this notification unless you override the CDialog::OnInitDialog()
98 // function to send the EM_SETEVENTMASK message to the control
99 // with the ENM_CHANGE flag ORed into the lParam mask.
101 // TODO: Add your control notification handler code here
103 ( (CAnimationView3D *) m_pView) ->SetFocal ( m_dFocus , m_dAngle ) ;
106 void CTune::OnChangeFocdist()
108 // TODO: If this is a RICHEDIT control, the control will not
109 // send this notification unless you override the CDialog::OnInitDialog()
110 // function to send the EM_SETEVENTMASK message to the control
111 // with the ENM_CHANGE flag ORed into the lParam mask.
113 // TODO: Add your control notification handler code here
115 ( (CAnimationView3D *) m_pView) ->SetFocal ( m_dFocus , m_dAngle ) ;
118 BOOL CTune::OnCommand(WPARAM wParam, LPARAM lParam)
120 // TODO: Add your specialized code here and/or call the base class
122 return CDialog::OnCommand(wParam, lParam);
125 BOOL CTune::OnInitDialog()
127 CDialog::OnInitDialog();
129 // TODO: Add extra initialization here
131 return TRUE; // return TRUE unless you set the focus to a control
132 // EXCEPTION: OCX Property Pages should return FALSE
135 BOOL CTune::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
137 // TODO: Add your specialized code here and/or call the base class
139 return CDialog::OnNotify(wParam, lParam, pResult);