Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / client_exp / results_dlg.cpp
blob8f9930b44313991ba8e71de422fde917e5b4c790
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 "results_dlg.h"
22 #ifdef _DEBUG
23 #define new DEBUG_NEW
24 #undef THIS_FILE
25 static char THIS_FILE[] = __FILE__;
26 #endif
28 /////////////////////////////////////////////////////////////////////////////
29 // CResultsDlg dialog
32 CResultsDlg::CResultsDlg(DWORD nHelpID, CWnd* pParent /*=NULL*/)
33 : CDialog()
35 InitModalIndirect (TaLocale_GetDialogResource (CResultsDlg::IDD), pParent);
37 //{{AFX_DATA_INIT(CResultsDlg)
38 // NOTE: the ClassWizard will add member initialization here
39 //}}AFX_DATA_INIT
41 m_nHelpID = nHelpID;
45 void CResultsDlg::DoDataExchange(CDataExchange* pDX)
47 CDialog::DoDataExchange(pDX);
48 //{{AFX_DATA_MAP(CResultsDlg)
49 DDX_Control(pDX, IDC_RESULTS_LABEL, m_ResultsLabel);
50 DDX_Control(pDX, IDC_LIST, m_List);
51 //}}AFX_DATA_MAP
54 BEGIN_MESSAGE_MAP(CResultsDlg, CDialog)
55 //{{AFX_MSG_MAP(CResultsDlg)
56 ON_BN_CLICKED(IDHELP, OnHelp)
57 //}}AFX_MSG_MAP
58 END_MESSAGE_MAP()
60 /////////////////////////////////////////////////////////////////////////////
61 // CResultsDlg message handlers
63 BOOL CResultsDlg::OnInitDialog()
65 CDialog::OnInitDialog();
67 SetWindowText(m_strDlgTitle);
68 m_ResultsLabel.SetWindowText(m_strResultsTitle);
70 ASSERT(m_Files.GetSize() == m_Results.GetSize());
72 m_List.SetTabStops(118);
74 for (int i = 0; i < m_Files.GetSize(); i++) {
75 CString strItem = m_Files[i] + "\t" + m_Results[i];
76 m_List.AddString(strItem);
79 return TRUE; // return TRUE unless you set the focus to a control
80 // EXCEPTION: OCX Property Pages should return FALSE
83 void CResultsDlg::SetContents(const CString& strDlgTitle, const CString& strResultsTitle, const CStringArray& files, const CStringArray& results)
85 m_strDlgTitle = strDlgTitle;
86 m_strResultsTitle = strResultsTitle;
88 m_Files.RemoveAll();
89 m_Files.Copy(files);
91 m_Results.RemoveAll();
92 m_Results.Copy(results);
95 void CResultsDlg::OnHelp()
97 ShowHelp(m_hWnd, m_nHelpID);