1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
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)
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
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.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
25 // NewFolderDialog.cpp : implementation file
29 #include "NewFolderDialog.h"
36 static char THIS_FILE[] = __FILE__;
39 /////////////////////////////////////////////////////////////////////////////
40 // CNewFolderDialog dialog
43 CNewFolderDialog::CNewFolderDialog(CWnd* pParent /*=NULL*/)
44 : CeCosDialog(IDD_NEW_FOLDER_DIALOG, pParent)
46 //{{AFX_DATA_INIT(CNewFolderDialog)
52 void CNewFolderDialog::DoDataExchange(CDataExchange* pDX)
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);
62 BEGIN_MESSAGE_MAP(CNewFolderDialog, CeCosDialog)
63 //{{AFX_MSG_MAP(CNewFolderDialog)
67 /////////////////////////////////////////////////////////////////////////////
68 // CNewFolderDialog message handlers
70 void CNewFolderDialog::OnOK()
73 if(!m_strFolder.CreateDirectory()){
74 CUtils::MessageBoxF(_T("Could not create folder %s"),m_strFolder);
80 BOOL CNewFolderDialog::OnInitDialog()
82 CeCosDialog::OnInitDialog();
83 CEdit *pEdit=(CEdit *)GetDlgItem(IDC_NEW_FOLDER_EDIT);
87 return FALSE; // return TRUE unless you set the focus to a control
88 // EXCEPTION: OCX Property Pages should return FALSE