OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [tools/] [src/] [tools/] [Utils/] [win32/] [CSHPropertyPage.cpp] - Blame information for rev 449

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 unneback
//####COPYRIGHTBEGIN####
2
//                                                                          
3
// ----------------------------------------------------------------------------
4
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5
//
6
// This program is part of the eCos host tools.
7
//
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) 
11
// any later version.
12
// 
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 
16
// more details.
17
// 
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.
21
//
22
// ----------------------------------------------------------------------------
23
//                                                                          
24
//####COPYRIGHTEND####
25
// CSHPropertyPage.cpp : implementation file
26
//
27
 
28
#include "stdafx.h"
29
#include "CSHPropertyPage.h"
30
#include <afxpriv.h> // for WM_COMMANDHELP
31
#include <htmlhelp.h>
32
 
33
#ifdef _DEBUG
34
#define new DEBUG_NEW
35
#undef THIS_FILE
36
static char THIS_FILE[] = __FILE__;
37
#endif
38
 
39
/////////////////////////////////////////////////////////////////////////////
40
// CCSHPropertyPage property page
41
IMPLEMENT_DYNCREATE(CCSHPropertyPage, CPropertyPage)
42
 
43
CCSHPropertyPage::~CCSHPropertyPage(){}
44
 
45
void CCSHPropertyPage::DoDataExchange(CDataExchange* pDX)
46
{
47
        CPropertyPage::DoDataExchange(pDX);
48
        //{{AFX_DATA_MAP(CCSHPropertyPage)
49
                // NOTE: the ClassWizard will add DDX and DDV calls here
50
        //}}AFX_DATA_MAP
51
}
52
 
53
 
54
BEGIN_MESSAGE_MAP(CCSHPropertyPage, CPropertyPage)
55
        //{{AFX_MSG_MAP(CCSHPropertyPage)
56
  ON_COMMAND(ID_WHATS_THIS,OnWhatsThis)
57
        ON_WM_CONTEXTMENU()
58
        ON_WM_HELPINFO()
59
  ON_MESSAGE(WM_COMMANDHELP,OnCommandHelp)
60
        ON_COMMAND(IDHELP, OnHelp)
61
        //}}AFX_MSG_MAP
62
END_MESSAGE_MAP()
63
 
64
/////////////////////////////////////////////////////////////////////////////
65
// CCSHPropertyPage message handlers
66
 
67
void CCSHPropertyPage::OnWhatsThis()
68
{
69
  DisplayHelp(m_pwndContext->m_hWnd,HelpID(m_pwndContext->m_hWnd),GetInstanceHandle());
70
}
71
 
72
void CCSHPropertyPage::OnContextMenu(CWnd*pWnd, CPoint pt)
73
{
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);
77
  }
78
}
79
 
80
BOOL CCSHPropertyPage::OnHelpInfo(HELPINFO* pHelpInfo)
81
{
82
  DisplayHelp((HWND)pHelpInfo->hItemHandle,HelpID((HWND)pHelpInfo->hItemHandle),GetInstanceHandle());
83
  return TRUE;
84
}
85
 
86
// Dummy implementations
87
UINT CCSHPropertyPage::HelpID(DWORD) const
88
{
89
  return 0; // dummy implementation
90
}
91
 
92
 
93
CString CCSHPropertyPage::CSHFile() const
94
{
95
  return CCSHCommon::GetCSHFilePath();
96
}
97
 
98
void CCSHPropertyPage::OnHelp()
99
{
100
  if(!CSHFile().IsEmpty()){
101
    HtmlHelp(NULL,GetCSHFilePath()+CSHFile(),HH_DISPLAY_TOPIC,0);
102
  }
103
}
104
 
105
HINSTANCE CCSHPropertyPage::GetInstanceHandle()
106
{
107
  return AfxGetInstanceHandle();
108
}
109
 
110
BOOL CCSHPropertyPage::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
111
{
112
  if(CCSHCommon::FilterMessage(message, wParam,lParam,pResult)){
113
    return true; // handled
114
  }
115
  return CPropertyPage::OnWndMsg(message, wParam, lParam, pResult);
116
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.