root/trunk/CompilerSettingsPage.cpp

Revision 5, 2.4 kB (checked in by qbert, 6 years ago)

Initial ( and last :( ) commit

Line 
1 // CompilerSettingsPage.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "Elephant.h"
6 #include "CompilerSettingsPage.h"
7
8 #ifdef _DEBUG
9 #define new DEBUG_NEW
10 #undef THIS_FILE
11 static char THIS_FILE[] = __FILE__;
12 #endif
13
14 /////////////////////////////////////////////////////////////////////////////
15 // CCompilerSettingsPage dialog
16
17
18 CCompilerSettingsPage::CCompilerSettingsPage(CWnd* pParent /*=NULL*/)
19    
20 {
21     //{{AFX_DATA_INIT(CCompilerSettingsPage)
22     m_ccompiler = _T(Globals::settings->baseSettings->GetCache("C_Compiler").c_str());
23     m_dcompiler = _T(Globals::settings->baseSettings->GetCache("D_Compiler").c_str());
24     m_linker = _T(Globals::settings->baseSettings->GetCache("Linker").c_str());
25     //}}AFX_DATA_INIT
26 }
27
28
29 void CCompilerSettingsPage::DoDataExchange(CDataExchange* pDX)
30 {
31     CDialog::DoDataExchange(pDX);
32     //{{AFX_DATA_MAP(CCompilerSettingsPage)
33     DDX_Control(pDX, IDC_BUTTON4, m_b3);
34     DDX_Control(pDX, IDC_BUTTON3, m_b2);
35     DDX_Control(pDX, IDC_BUTTON1, m_b);
36     DDX_Text(pDX, IDC_EDIT2, m_ccompiler);
37     DDX_Text(pDX, IDC_EDIT1, m_dcompiler);
38     DDX_Text(pDX, IDC_EDIT3, m_linker);
39     //}}AFX_DATA_MAP
40 }
41
42
43 BEGIN_MESSAGE_MAP(CCompilerSettingsPage, CDialog)
44     //{{AFX_MSG_MAP(CCompilerSettingsPage)
45     ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
46     ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
47     ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
48     //}}AFX_MSG_MAP
49 END_MESSAGE_MAP()
50
51 /////////////////////////////////////////////////////////////////////////////
52 // CCompilerSettingsPage message handlers
53
54 BOOL CCompilerSettingsPage::OnInitDialog()
55 {
56     CDialog::OnInitDialog();
57    
58 SetupButton(&m_b);
59 SetupButton(&m_b2);
60 SetupButton(&m_b3);
61    
62     return TRUE;  // return TRUE unless you set the focus to a control
63                   // EXCEPTION: OCX Property Pages should return FALSE
64 }
65
66 void CCompilerSettingsPage::OnButton1()
67 {
68
69     string x;
70     if ( GetFileFromCFileDialog(Globals::lastDir, x) )
71     {
72         m_dcompiler = x.c_str();
73         UpdateData(FALSE);
74     }
75 }
76
77 void CCompilerSettingsPage::OnButton3()
78 {
79     string x;
80     if ( GetFileFromCFileDialog(Globals::lastDir, x) )
81     {
82         m_ccompiler = x.c_str();
83         UpdateData(FALSE);
84     }   // TODO: Add your control notification handler code here
85    
86 }
87
88 void CCompilerSettingsPage::OnButton4()
89 {
90
91
92     string x;
93     if ( GetFileFromCFileDialog(Globals::lastDir, x) )
94     {
95         m_linker = x.c_str();
96         UpdateData(FALSE);
97     }   // TODO: Add your control notification handler code here
98
99    
100 }
Note: See TracBrowser for help on using the browser.