OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [configtool/] [common/] [win32/] [NewFolderDialog.cpp] - Blame information for rev 790

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
// NewFolderDialog.cpp : implementation file
23
//
24
 
25
#include "stdafx.h"
26
#include "NewFolderDialog.h"
27
#include "CTUtils.h"
28
#include "resource.h"
29
 
30
#ifdef _DEBUG
31
#define new DEBUG_NEW
32
#undef THIS_FILE
33
static char THIS_FILE[] = __FILE__;
34
#endif
35
 
36
/////////////////////////////////////////////////////////////////////////////
37
// CNewFolderDialog dialog
38
 
39
 
40
CNewFolderDialog::CNewFolderDialog(CWnd* pParent /*=NULL*/)
41
        : CeCosDialog(IDD_NEW_FOLDER_DIALOG, pParent)
42
{
43
        //{{AFX_DATA_INIT(CNewFolderDialog)
44
        m_strFolder = _T("");
45
        //}}AFX_DATA_INIT
46
}
47
 
48
 
49
void CNewFolderDialog::DoDataExchange(CDataExchange* pDX)
50
{
51
        CeCosDialog::DoDataExchange(pDX);
52
        //{{AFX_DATA_MAP(CNewFolderDialog)
53
        DDX_Text(pDX, IDC_NEW_FOLDER_EDIT, m_strFolder);
54
        DDV_MaxChars(pDX, m_strFolder, 256);
55
        //}}AFX_DATA_MAP
56
}
57
 
58
 
59
BEGIN_MESSAGE_MAP(CNewFolderDialog, CeCosDialog)
60
        //{{AFX_MSG_MAP(CNewFolderDialog)
61
        //}}AFX_MSG_MAP
62
END_MESSAGE_MAP()
63
 
64
/////////////////////////////////////////////////////////////////////////////
65
// CNewFolderDialog message handlers
66
 
67
void CNewFolderDialog::OnOK()
68
{
69
        UpdateData();
70
        if(!m_strFolder.CreateDirectory()){
71
                CUtils::MessageBoxF(_T("Could not create folder %s"),m_strFolder);
72
        } else {
73
                CeCosDialog::OnOK();
74
        }
75
}
76
 
77
BOOL CNewFolderDialog::OnInitDialog()
78
{
79
        CeCosDialog::OnInitDialog();
80
        CEdit *pEdit=(CEdit *)GetDlgItem(IDC_NEW_FOLDER_EDIT);
81
        pEdit->SetFocus();
82
        pEdit->SetSel(0,-1);
83
 
84
        return FALSE;  // return TRUE unless you set the focus to a control
85
                      // EXCEPTION: OCX Property Pages should return FALSE
86
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.