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