1 // BoxRadius.cpp : implementation file
5 #include "Viewer3dApp.h"
8 /////////////////////////////////////////////////////////////////////////////
10 BoxRadius::BoxRadius(CWnd* pParent,
12 : CDialog(BoxRadius::IDD, pParent)
14 //{{AFX_DATA_INIT(BoxRadius)
20 void BoxRadius::DoDataExchange(CDataExchange* pDX)
22 CDialog::DoDataExchange(pDX);
23 //{{AFX_DATA_MAP(BoxRadius)
24 DDX_Control(pDX, IDC_SPIN_RADIUS, m_spinradius);
25 DDX_Text(pDX, IDC_EDIT_RADIUS, m_radius);
30 BEGIN_MESSAGE_MAP(BoxRadius, CDialog)
31 //{{AFX_MSG_MAP(BoxRadius)
32 ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_RADIUS, OnDeltaposSpinRadius)
36 /////////////////////////////////////////////////////////////////////////////
37 // BoxRadius message handlers
39 BOOL BoxRadius::OnInitDialog()
41 CDialog::OnInitDialog();
43 // TODO: Add extra initialization here
44 m_spinradius.SetRange(-10000,10000);
45 return TRUE; // return TRUE unless you set the focus to a control
46 // EXCEPTION: OCX Property Pages should return FALSE
49 void BoxRadius::OnDeltaposSpinRadius(NMHDR* pNMHDR, LRESULT* pResult)
51 NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
52 // TODO: Add your control notification handler code here
53 if (pNMUpDown->iDelta == 1)
54 pNMUpDown->iDelta = 1;
56 pNMUpDown->iDelta = -1;
57 m_radius = m_radius + pNMUpDown->iDelta;