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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [tools/] [src/] [tools/] [configtool/] [common/] [win32/] [NewFolderDialog.cpp] - Blame information for rev 403

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

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

powered by: WebSVN 2.1.0

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