etc/services - sync with NetBSD-8
[minix.git] / external / bsd / bind / dist / bin / win32 / BINDInstall / DirBrowse.cpp
bloba473d0830cbdbac45f8a5f7e4b6156df2fc8d3a9
1 /*
2 * Portions Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
3 * Portions Copyright (C) 2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* Id: DirBrowse.cpp,v 1.6 2007/06/19 23:47:07 tbox Exp */
21 * Copyright (c) 1999-2000 by Nortel Networks Corporation
23 * Permission to use, copy, modify, and distribute this software for any
24 * purpose with or without fee is hereby granted, provided that the above
25 * copyright notice and this permission notice appear in all copies.
27 * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS
28 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
29 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS
30 * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
31 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
32 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
33 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
34 * SOFTWARE.
37 #include "stdafx.h"
38 #include "BINDInstall.h"
39 #include "DirBrowse.h"
41 #ifdef _DEBUG
42 #define new DEBUG_NEW
43 #undef THIS_FILE
44 static char THIS_FILE[] = __FILE__;
45 #endif
47 /////////////////////////////////////////////////////////////////////////////
48 // CDirBrowse dialog
51 CDirBrowse::CDirBrowse(CString initialDir, CWnd* pParent /*=NULL*/)
52 : CDialog(CDirBrowse::IDD, pParent)
54 //{{AFX_DATA_INIT(CDirBrowse)
55 // NOTE: the ClassWizard will add member initialization here
56 //}}AFX_DATA_INIT
57 m_selectedDir = initialDir;
61 void CDirBrowse::DoDataExchange(CDataExchange* pDX)
63 CDialog::DoDataExchange(pDX);
64 //{{AFX_DATA_MAP(CDirBrowse)
65 // NOTE: the ClassWizard will add DDX and DDV calls here
66 //}}AFX_DATA_MAP
70 BEGIN_MESSAGE_MAP(CDirBrowse, CDialog)
71 //{{AFX_MSG_MAP(CDirBrowse)
72 ON_LBN_DBLCLK(IDC_DIRLIST, OnDblclkDirlist)
73 ON_LBN_SELCHANGE(IDC_DIRLIST, OnSelchangeDirlist)
74 //}}AFX_MSG_MAP
75 END_MESSAGE_MAP()
77 /////////////////////////////////////////////////////////////////////////////
78 // CDirBrowse message handlers
80 BOOL CDirBrowse::OnInitDialog()
82 CDialog::OnInitDialog();
84 DlgDirList((LPTSTR)(LPCTSTR)m_selectedDir, IDC_DIRLIST, IDC_CURDIR, DDL_DIRECTORY);
86 return TRUE; // return TRUE unless you set the focus to a control
87 // EXCEPTION: OCX Property Pages should return FALSE
90 void CDirBrowse::OnDblclkDirlist()
92 CListBox *lb = (CListBox *)GetDlgItem(IDC_DIRLIST);
93 CString curSel;
95 lb->GetText(lb->GetCurSel(), curSel);
96 DlgDirList((LPTSTR)(LPCTSTR)curSel, IDC_DIRLIST, IDC_CURDIR, DDL_DIRECTORY);
99 void CDirBrowse::OnSelchangeDirlist()
101 // TODO: Add your control notification handler code here