Mercurial > vba-linux
view src/win32/MaxScale.cpp @ 3:b05d00f19d80
fix some formatting
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:33:11 -0600 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 // MaxScale.cpp : implementation file2 //4 #include "stdafx.h"5 #include "resource.h"6 #include "MaxScale.h"7 #include "VBA.h"9 /////////////////////////////////////////////////////////////////////////////10 // MaxScale dialog12 MaxScale::MaxScale(CWnd*pParent /*=NULL*/)13 : CDialog(MaxScale::IDD, pParent)14 {15 //{{AFX_DATA_INIT(MaxScale)16 // NOTE: the ClassWizard will add member initialization here17 //}}AFX_DATA_INIT18 }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_MAP26 }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_MAP33 END_MESSAGE_MAP()35 /////////////////////////////////////////////////////////////////////////////36 // MaxScale message handlers38 void MaxScale::OnCancel()39 {40 EndDialog(FALSE);41 }43 void MaxScale::OnOk()44 {45 CString tmp;46 m_value.GetWindowText(tmp);47 theApp.fsMaxScale = atoi(tmp);48 EndDialog(TRUE);49 }51 BOOL MaxScale::OnInitDialog()52 {53 CDialog::OnInitDialog();55 CString temp;57 temp.Format("%d", theApp.fsMaxScale);59 m_value.SetWindowText(temp);61 return TRUE; // return TRUE unless you set the focus to a control62 // EXCEPTION: OCX Property Pages should return FALSE63 }