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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [Utils/] [win32/] [CSHPropertyPage.cpp] - Blame information for rev 790

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

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
// CSHPropertyPage.cpp : implementation file
23
//
24
 
25
#include "stdafx.h"
26
#include "CSHPropertyPage.h"
27
#include <afxpriv.h> // for WM_COMMANDHELP
28
#include <htmlhelp.h>
29
 
30
#ifdef _DEBUG
31
#define new DEBUG_NEW
32
#undef THIS_FILE
33
static char THIS_FILE[] = __FILE__;
34
#endif
35
 
36
/////////////////////////////////////////////////////////////////////////////
37
// CCSHPropertyPage property page
38
IMPLEMENT_DYNCREATE(CCSHPropertyPage, CPropertyPage)
39
 
40
CCSHPropertyPage::~CCSHPropertyPage(){}
41
 
42
void CCSHPropertyPage::DoDataExchange(CDataExchange* pDX)
43
{
44
        CPropertyPage::DoDataExchange(pDX);
45
        //{{AFX_DATA_MAP(CCSHPropertyPage)
46
                // NOTE: the ClassWizard will add DDX and DDV calls here
47
        //}}AFX_DATA_MAP
48
}
49
 
50
 
51
BEGIN_MESSAGE_MAP(CCSHPropertyPage, CPropertyPage)
52
        //{{AFX_MSG_MAP(CCSHPropertyPage)
53
  ON_COMMAND(ID_WHATS_THIS,OnWhatsThis)
54
        ON_WM_CONTEXTMENU()
55
        ON_WM_HELPINFO()
56
  ON_MESSAGE(WM_COMMANDHELP,OnCommandHelp)
57
        ON_COMMAND(IDHELP, OnHelp)
58
        //}}AFX_MSG_MAP
59
END_MESSAGE_MAP()
60
 
61
/////////////////////////////////////////////////////////////////////////////
62
// CCSHPropertyPage message handlers
63
 
64
void CCSHPropertyPage::OnWhatsThis()
65
{
66
  DisplayHelp(m_pwndContext->m_hWnd,HelpID(m_pwndContext->m_hWnd),GetInstanceHandle());
67
}
68
 
69
void CCSHPropertyPage::OnContextMenu(CWnd*pWnd, CPoint pt)
70
{
71
  m_pwndContext=WndFromPoint(this,pWnd,pt);
72
  if(NULL==m_pwndContext || !CCSHCommon::OnContextMenu(this,pt,HelpID(m_pwndContext->GetDlgCtrlID()))){
73
    CPropertyPage::OnContextMenu(pWnd,pt);
74
  }
75
}
76
 
77
BOOL CCSHPropertyPage::OnHelpInfo(HELPINFO* pHelpInfo)
78
{
79
  DisplayHelp((HWND)pHelpInfo->hItemHandle,HelpID((HWND)pHelpInfo->hItemHandle),GetInstanceHandle());
80
  return TRUE;
81
}
82
 
83
// Dummy implementations
84
UINT CCSHPropertyPage::HelpID(DWORD) const
85
{
86
  return 0; // dummy implementation
87
}
88
 
89
 
90
CString CCSHPropertyPage::CSHFile() const
91
{
92
  return CCSHCommon::GetCSHFilePath();
93
}
94
 
95
void CCSHPropertyPage::OnHelp()
96
{
97
  if(!CSHFile().IsEmpty()){
98
    HtmlHelp(NULL,GetCSHFilePath()+CSHFile(),HH_DISPLAY_TOPIC,0);
99
  }
100
}
101
 
102
HINSTANCE CCSHPropertyPage::GetInstanceHandle()
103
{
104
  return AfxGetInstanceHandle();
105
}
106
 
107
BOOL CCSHPropertyPage::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
108
{
109
  if(CCSHCommon::FilterMessage(message, wParam,lParam,pResult)){
110
    return true; // handled
111
  }
112
  return CPropertyPage::OnWndMsg(message, wParam, lParam, pResult);
113
}

powered by: WebSVN 2.1.0

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