root/trunk/FileExtensionsPage.cpp

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

Initial ( and last :( ) commit

Line 
1 // FileExtensionsPage.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "Elephant.h"
6 #include "FileExtensionsPage.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 // CFileExtensionsPage dialog
16
17
18 CFileExtensionsPage::CFileExtensionsPage(CWnd* pParent /*=NULL*/)
19    
20 {
21     //{{AFX_DATA_INIT(CFileExtensionsPage)
22     m_link = FALSE;
23     m_command = _T("");
24     //}}AFX_DATA_INIT
25 }
26
27
28 void CFileExtensionsPage::DoDataExchange(CDataExchange* pDX)
29 {
30     CDialog::DoDataExchange(pDX);
31     //{{AFX_DATA_MAP(CFileExtensionsPage)
32     DDX_Control(pDX, IDC_LIST1, m_extCtrl);
33     DDX_Control(pDX, IDC_COMBO1, m_extension);
34     DDX_Control(pDX, IDC_BUTTON1, m_browse);
35     DDX_Check(pDX, IDC_CHECK1, m_link);
36     DDX_Text(pDX, IDC_EDIT1, m_command);
37     //}}AFX_DATA_MAP
38 }
39
40
41 BEGIN_MESSAGE_MAP(CFileExtensionsPage, CDialog)
42     //{{AFX_MSG_MAP(CFileExtensionsPage)
43     ON_BN_CLICKED(IDC_BUTTON1, OnBrowse)
44     //}}AFX_MSG_MAP
45 END_MESSAGE_MAP()
46
47 /////////////////////////////////////////////////////////////////////////////
48 // CFileExtensionsPage message handlers
49
50 BOOL CFileExtensionsPage::OnInitDialog()
51 {
52     CDialog::OnInitDialog();
53    
54
55    
56     SetupListCtrl(&m_extCtrl); 
57     return TRUE;  // return TRUE unless you set the focus to a control
58                   // EXCEPTION: OCX Property Pages should return FALSE
59 }
60
61 void CFileExtensionsPage::OnBrowse()
62 {
63     string file ;
64
65     if ( GetFileFromCFileDialog(Globals::lastDir,file,"","EXE (*.exe)|*.exe||") )
66     {
67         m_command = file.c_str();
68         UpdateData(FALSE);
69     }
70    
71 }
Note: See TracBrowser for help on using the browser.