annotate src/win32/MaxScale.cpp @ 2:3549bbe597ed

adding makefile.am
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:47 -0600
parents f9f4f1b99eed
children
rev   line source
rlm@1 1 // MaxScale.cpp : implementation file
rlm@1 2 //
rlm@1 3
rlm@1 4 #include "stdafx.h"
rlm@1 5 #include "resource.h"
rlm@1 6 #include "MaxScale.h"
rlm@1 7 #include "VBA.h"
rlm@1 8
rlm@1 9 /////////////////////////////////////////////////////////////////////////////
rlm@1 10 // MaxScale dialog
rlm@1 11
rlm@1 12 MaxScale::MaxScale(CWnd*pParent /*=NULL*/)
rlm@1 13 : CDialog(MaxScale::IDD, pParent)
rlm@1 14 {
rlm@1 15 //{{AFX_DATA_INIT(MaxScale)
rlm@1 16 // NOTE: the ClassWizard will add member initialization here
rlm@1 17 //}}AFX_DATA_INIT
rlm@1 18 }
rlm@1 19
rlm@1 20 void MaxScale::DoDataExchange(CDataExchange*pDX)
rlm@1 21 {
rlm@1 22 CDialog::DoDataExchange(pDX);
rlm@1 23 //{{AFX_DATA_MAP(MaxScale)
rlm@1 24 DDX_Control(pDX, IDC_VALUE, m_value);
rlm@1 25 //}}AFX_DATA_MAP
rlm@1 26 }
rlm@1 27
rlm@1 28 BEGIN_MESSAGE_MAP(MaxScale, CDialog)
rlm@1 29 //{{AFX_MSG_MAP(MaxScale)
rlm@1 30 ON_BN_CLICKED(ID_OK, OnOk)
rlm@1 31 ON_BN_CLICKED(ID_CANCEL, OnCancel)
rlm@1 32 //}}AFX_MSG_MAP
rlm@1 33 END_MESSAGE_MAP()
rlm@1 34
rlm@1 35 /////////////////////////////////////////////////////////////////////////////
rlm@1 36 // MaxScale message handlers
rlm@1 37
rlm@1 38 void MaxScale::OnCancel()
rlm@1 39 {
rlm@1 40 EndDialog(FALSE);
rlm@1 41 }
rlm@1 42
rlm@1 43 void MaxScale::OnOk()
rlm@1 44 {
rlm@1 45 CString tmp;
rlm@1 46 m_value.GetWindowText(tmp);
rlm@1 47 theApp.fsMaxScale = atoi(tmp);
rlm@1 48 EndDialog(TRUE);
rlm@1 49 }
rlm@1 50
rlm@1 51 BOOL MaxScale::OnInitDialog()
rlm@1 52 {
rlm@1 53 CDialog::OnInitDialog();
rlm@1 54
rlm@1 55 CString temp;
rlm@1 56
rlm@1 57 temp.Format("%d", theApp.fsMaxScale);
rlm@1 58
rlm@1 59 m_value.SetWindowText(temp);
rlm@1 60
rlm@1 61 return TRUE; // return TRUE unless you set the focus to a control
rlm@1 62 // EXCEPTION: OCX Property Pages should return FALSE
rlm@1 63 }
rlm@1 64