diff src/win32/MaxScale.cpp @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/MaxScale.cpp	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,64 @@
     1.4 +// MaxScale.cpp : implementation file
     1.5 +//
     1.6 +
     1.7 +#include "stdafx.h"
     1.8 +#include "resource.h"
     1.9 +#include "MaxScale.h"
    1.10 +#include "VBA.h"
    1.11 +
    1.12 +/////////////////////////////////////////////////////////////////////////////
    1.13 +// MaxScale dialog
    1.14 +
    1.15 +MaxScale::MaxScale(CWnd*pParent /*=NULL*/)
    1.16 +	: CDialog(MaxScale::IDD, pParent)
    1.17 +{
    1.18 +	//{{AFX_DATA_INIT(MaxScale)
    1.19 +	// NOTE: the ClassWizard will add member initialization here
    1.20 +	//}}AFX_DATA_INIT
    1.21 +}
    1.22 +
    1.23 +void MaxScale::DoDataExchange(CDataExchange*pDX)
    1.24 +{
    1.25 +	CDialog::DoDataExchange(pDX);
    1.26 +	//{{AFX_DATA_MAP(MaxScale)
    1.27 +	DDX_Control(pDX, IDC_VALUE, m_value);
    1.28 +	//}}AFX_DATA_MAP
    1.29 +}
    1.30 +
    1.31 +BEGIN_MESSAGE_MAP(MaxScale, CDialog)
    1.32 +//{{AFX_MSG_MAP(MaxScale)
    1.33 +ON_BN_CLICKED(ID_OK, OnOk)
    1.34 +ON_BN_CLICKED(ID_CANCEL, OnCancel)
    1.35 +//}}AFX_MSG_MAP
    1.36 +END_MESSAGE_MAP()
    1.37 +
    1.38 +/////////////////////////////////////////////////////////////////////////////
    1.39 +// MaxScale message handlers
    1.40 +
    1.41 +void MaxScale::OnCancel()
    1.42 +{
    1.43 +	EndDialog(FALSE);
    1.44 +}
    1.45 +
    1.46 +void MaxScale::OnOk()
    1.47 +{
    1.48 +	CString tmp;
    1.49 +	m_value.GetWindowText(tmp);
    1.50 +	theApp.fsMaxScale = atoi(tmp);
    1.51 +	EndDialog(TRUE);
    1.52 +}
    1.53 +
    1.54 +BOOL MaxScale::OnInitDialog()
    1.55 +{
    1.56 +	CDialog::OnInitDialog();
    1.57 +
    1.58 +	CString temp;
    1.59 +
    1.60 +	temp.Format("%d", theApp.fsMaxScale);
    1.61 +
    1.62 +	m_value.SetWindowText(temp);
    1.63 +
    1.64 +	return TRUE;  // return TRUE unless you set the focus to a control
    1.65 +	              // EXCEPTION: OCX Property Pages should return FALSE
    1.66 +}
    1.67 +