1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
25 // eCosDialog.cpp : implementation file
29 #include "eCosDialog.h"
34 static char THIS_FILE[] = __FILE__;
37 /////////////////////////////////////////////////////////////////////////////
40 void CeCosDialog::DoDataExchange(CDataExchange* pDX)
42 CCSHDialog::DoDataExchange(pDX);
43 //{{AFX_DATA_MAP(CeCosDialog)
44 // NOTE: the ClassWizard will add DDX and DDV calls here
49 BEGIN_MESSAGE_MAP(CeCosDialog, CCSHDialog)
50 //{{AFX_MSG_MAP(CeCosDialog)
54 /////////////////////////////////////////////////////////////////////////////
55 // CeCosDialog message handlers
57 CPtrArray CeCosDialog::m_arDialogMaps;
59 CString CeCosDialog::CSHFile() const
61 return CSHFile((UINT)m_lpszTemplateName);
64 CString CeCosDialog::CSHFile(UINT nID)
67 for(int j=m_arDialogMaps.GetSize()-1;j>=0;--j){
68 UINT *map=(UINT *)m_arDialogMaps[j];
69 for(int i=0;map[i];i+=2){
72 if(strFile.LoadString(map[i+1])){
73 return m_strCSHFilePath+strFile;
75 TRACE(_T("CCSHDialog::Failed to load help file id %d for dialog id=%d\n"),map[i+1],nID);
81 TRACE(_T("CCSHDialog::Failed to find help file for dialog id=%d\n"),nID);
85 UINT CeCosDialog::HelpID (DWORD dwCtrlID) const
87 return HelpID((UINT)m_lpszTemplateName,dwCtrlID);
90 UINT CeCosDialog::HelpID (UINT dlgID, DWORD dwCtrlID)
92 UNUSED_ALWAYS(dlgID); // because we have a single namespace for all control IDs
96 id=_T("Closes the dialog and saves any changes you have made.");
99 id=_T("Closes the dialog without saving any changes you have made.");
102 id=_T("Saves all the changes you have made without closing this dialog box.");
106 id=_T("Click this to display an overview of the dialog box.");
109 id=(LPCTSTR)dwCtrlID;
115 HINSTANCE CeCosDialog::GetInstanceHandle()
118 extern HINSTANCE heCosInstance;
119 return heCosInstance;
121 return AfxGetInstanceHandle();