Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / client_exp / mount_points_dlg.cpp
blobbb0bd88fa3ce966b28b1544322dbdb2060a8d545
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
10 #include "stdafx.h"
11 #include <winsock2.h>
12 #include <ws2tcpip.h>
14 extern "C" {
15 #include <afs/param.h>
16 #include <afs/stds.h>
19 #include "afs_shl_ext.h"
20 #include "mount_points_dlg.h"
22 #ifdef _DEBUG
23 #define new DEBUG_NEW
24 #undef THIS_FILE
25 static char THIS_FILE[] = __FILE__;
26 #endif
28 /////////////////////////////////////////////////////////////////////////////
29 // CMountPointsDlg dialog
32 CMountPointsDlg::CMountPointsDlg(CWnd* pParent /*=NULL*/)
33 : CDialog()
35 InitModalIndirect (TaLocale_GetDialogResource (CMountPointsDlg::IDD), pParent);
37 //{{AFX_DATA_INIT(CMountPointsDlg)
38 // NOTE: the ClassWizard will add member initialization here
39 //}}AFX_DATA_INIT
43 void CMountPointsDlg::DoDataExchange(CDataExchange* pDX)
45 CDialog::DoDataExchange(pDX);
46 //{{AFX_DATA_MAP(CMountPointsDlg)
47 DDX_Control(pDX, IDC_LIST, m_List);
48 //}}AFX_DATA_MAP
52 BEGIN_MESSAGE_MAP(CMountPointsDlg, CDialog)
53 //{{AFX_MSG_MAP(CMountPointsDlg)
54 ON_BN_CLICKED(IDHELP, OnHelp)
55 //}}AFX_MSG_MAP
56 END_MESSAGE_MAP()
58 /////////////////////////////////////////////////////////////////////////////
59 // CMountPointsDlg message handlers
61 BOOL CMountPointsDlg::OnInitDialog()
63 CDialog::OnInitDialog();
65 int tabs[] = { 64, 145, 220 };
67 m_List.SetTabStops(sizeof(tabs) / sizeof(int), tabs);
69 for (int i = 0; i < m_MountPoints.GetSize(); i++)
70 m_List.AddString(m_MountPoints[i]);
72 return TRUE; // return TRUE unless you set the focus to a control
73 // EXCEPTION: OCX Property Pages should return FALSE
76 void CMountPointsDlg::SetMountPoints(const CStringArray& mountPoints)
78 m_MountPoints.RemoveAll();
80 m_MountPoints.Copy(mountPoints);
83 void CMountPointsDlg::OnHelp()
85 ShowHelp(m_hWnd, MOUNT_POINTS_HELP_ID);