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 // CSHPropertyPage.cpp : implementation file
29 #include "CSHPropertyPage.h"
30 #include <afxpriv.h> // for WM_COMMANDHELP
36 static char THIS_FILE[] = __FILE__;
39 /////////////////////////////////////////////////////////////////////////////
40 // CCSHPropertyPage property page
41 IMPLEMENT_DYNCREATE(CCSHPropertyPage, CPropertyPage)
43 CCSHPropertyPage::~CCSHPropertyPage(){}
45 void CCSHPropertyPage::DoDataExchange(CDataExchange* pDX)
47 CPropertyPage::DoDataExchange(pDX);
48 //{{AFX_DATA_MAP(CCSHPropertyPage)
49 // NOTE: the ClassWizard will add DDX and DDV calls here
54 BEGIN_MESSAGE_MAP(CCSHPropertyPage, CPropertyPage)
55 //{{AFX_MSG_MAP(CCSHPropertyPage)
56 ON_COMMAND(ID_WHATS_THIS,OnWhatsThis)
59 ON_MESSAGE(WM_COMMANDHELP,OnCommandHelp)
60 ON_COMMAND(IDHELP, OnHelp)
64 /////////////////////////////////////////////////////////////////////////////
65 // CCSHPropertyPage message handlers
67 void CCSHPropertyPage::OnWhatsThis()
69 DisplayHelp(m_pwndContext->m_hWnd,HelpID(m_pwndContext->m_hWnd),GetInstanceHandle());
72 void CCSHPropertyPage::OnContextMenu(CWnd*pWnd, CPoint pt)
74 m_pwndContext=WndFromPoint(this,pWnd,pt);
75 if(NULL==m_pwndContext || !CCSHCommon::OnContextMenu(this,pt,HelpID(m_pwndContext->GetDlgCtrlID()))){
76 CPropertyPage::OnContextMenu(pWnd,pt);
80 BOOL CCSHPropertyPage::OnHelpInfo(HELPINFO* pHelpInfo)
82 DisplayHelp((HWND)pHelpInfo->hItemHandle,HelpID((HWND)pHelpInfo->hItemHandle),GetInstanceHandle());
86 // Dummy implementations
87 UINT CCSHPropertyPage::HelpID(DWORD) const
89 return 0; // dummy implementation
93 CString CCSHPropertyPage::CSHFile() const
95 return CCSHCommon::GetCSHFilePath();
98 void CCSHPropertyPage::OnHelp()
100 if(!CSHFile().IsEmpty()){
101 HtmlHelp(NULL,GetCSHFilePath()+CSHFile(),HH_DISPLAY_TOPIC,0);
105 HINSTANCE CCSHPropertyPage::GetInstanceHandle()
107 return AfxGetInstanceHandle();
110 BOOL CCSHPropertyPage::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
112 if(CCSHCommon::FilterMessage(message, wParam,lParam,pResult)){
113 return true; // handled
115 return CPropertyPage::OnWndMsg(message, wParam, lParam, pResult);