Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / client_exp / down_servers_dlg.cpp
blob18c43e4b484ebdfa5770aa78e27169d08ad5fcfa
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 "down_servers_dlg.h"
21 #ifdef _DEBUG
22 #define new DEBUG_NEW
23 #undef THIS_FILE
24 static char THIS_FILE[] = __FILE__;
25 #endif
27 /////////////////////////////////////////////////////////////////////////////
28 // CDownServersDlg dialog
31 CDownServersDlg::CDownServersDlg(CWnd* pParent /*=NULL*/)
32 : CDialog()
34 InitModalIndirect (TaLocale_GetDialogResource (CDownServersDlg::IDD), pParent);
36 //{{AFX_DATA_INIT(CDownServersDlg)
37 // NOTE: the ClassWizard will add member initialization here
38 //}}AFX_DATA_INIT
41 void CDownServersDlg::DoDataExchange(CDataExchange* pDX)
43 CDialog::DoDataExchange(pDX);
44 //{{AFX_DATA_MAP(CDownServersDlg)
45 DDX_Control(pDX, IDC_LIST, m_ServerList);
46 //}}AFX_DATA_MAP
49 BEGIN_MESSAGE_MAP(CDownServersDlg, CDialog)
50 //{{AFX_MSG_MAP(CDownServersDlg)
51 //}}AFX_MSG_MAP
52 END_MESSAGE_MAP()
54 /////////////////////////////////////////////////////////////////////////////
55 // CDownServersDlg message handlers
57 BOOL CDownServersDlg::OnInitDialog()
59 CDialog::OnInitDialog();
61 for (int i = 0; i < m_ServerNames.GetSize(); i++)
62 m_ServerList.AddString(m_ServerNames[i]);
64 return TRUE; // return TRUE unless you set the focus to a control
65 // EXCEPTION: OCX Property Pages should return FALSE
68 void CDownServersDlg::SetServerNames(const CStringArray& serverNames)
70 m_ServerNames.RemoveAll();
72 m_ServerNames.Copy(serverNames);