"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.11.23/bin/win32/BINDInstall/DirBrowse.cpp" (7 Sep 2020, 2887 Bytes) of package /linux/misc/dns/bind9/9.11.23/bind-9.11.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "DirBrowse.cpp" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 /*
   13  * Copyright (c) 1999-2000 by Nortel Networks Corporation
   14  *
   15  * Permission to use, copy, modify, and distribute this software for any
   16  * purpose with or without fee is hereby granted, provided that the above
   17  * copyright notice and this permission notice appear in all copies.
   18  *
   19  * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS
   20  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
   21  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS
   22  * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
   23  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
   24  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
   25  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
   26  * SOFTWARE.
   27  */
   28 
   29 #include "stdafx.h"
   30 #include "BINDInstall.h"
   31 #include "DirBrowse.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 // CDirBrowse dialog
   41 
   42 
   43 CDirBrowse::CDirBrowse(CString initialDir, CWnd* pParent /*=NULL*/)
   44     : CDialog(CDirBrowse::IDD, pParent)
   45 {
   46     //{{AFX_DATA_INIT(CDirBrowse)
   47         // NOTE: the ClassWizard will add member initialization here
   48     //}}AFX_DATA_INIT
   49     /* cppcheck-suppress useInitializationList */
   50     m_selectedDir = initialDir;
   51 }
   52 
   53 
   54 void CDirBrowse::DoDataExchange(CDataExchange* pDX)
   55 {
   56     CDialog::DoDataExchange(pDX);
   57     //{{AFX_DATA_MAP(CDirBrowse)
   58         // NOTE: the ClassWizard will add DDX and DDV calls here
   59     //}}AFX_DATA_MAP
   60 }
   61 
   62 
   63 BEGIN_MESSAGE_MAP(CDirBrowse, CDialog)
   64     //{{AFX_MSG_MAP(CDirBrowse)
   65     ON_LBN_DBLCLK(IDC_DIRLIST, OnDblclkDirlist)
   66     ON_LBN_SELCHANGE(IDC_DIRLIST, OnSelchangeDirlist)
   67     //}}AFX_MSG_MAP
   68 END_MESSAGE_MAP()
   69 
   70 /////////////////////////////////////////////////////////////////////////////
   71 // CDirBrowse message handlers
   72 
   73 BOOL CDirBrowse::OnInitDialog()
   74 {
   75     CDialog::OnInitDialog();
   76 
   77     DlgDirList((LPTSTR)(LPCTSTR)m_selectedDir, IDC_DIRLIST, IDC_CURDIR, DDL_DIRECTORY);
   78 
   79     return TRUE;  // return TRUE unless you set the focus to a control
   80               // EXCEPTION: OCX Property Pages should return FALSE
   81 }
   82 
   83 void CDirBrowse::OnDblclkDirlist()
   84 {
   85     CListBox *lb = (CListBox *)GetDlgItem(IDC_DIRLIST);
   86     CString curSel;
   87 
   88     lb->GetText(lb->GetCurSel(), curSel);
   89     DlgDirList((LPTSTR)(LPCTSTR)curSel, IDC_DIRLIST, IDC_CURDIR, DDL_DIRECTORY);
   90 }
   91 
   92 void CDirBrowse::OnSelchangeDirlist()
   93 {
   94     // TODO: Add your control notification handler code here
   95 
   96 }