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/] [MultiLineEditDialog.cpp] - Blame information for rev 174

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
// MultiLineEditDialog.cpp : implementation file
26
//
27
//
28
//===========================================================================
29
//#####DESCRIPTIONBEGIN####
30
//
31
// Author(s):   sdf
32
// Contact(s):  sdf
33
// Date:                1998/08/11
34
// Version:             0.01
35
// Purpose:     
36
// Description: This is the implementation of the popup dialog for in-cell editing
37
//                          of multi-line string items
38
// Requires:    
39
// Provides:    
40
// See also:    
41
// Known bugs:  
42
// Usage:       
43
//
44
//####DESCRIPTIONEND####
45
//
46
//===========================================================================
47
 
48
#include "stdafx.h"
49
#include "MultiLineEditDialog.h"
50
 
51
#ifdef _DEBUG
52
#define new DEBUG_NEW
53
#undef THIS_FILE
54
static char THIS_FILE[] = __FILE__;
55
#endif
56
 
57
/////////////////////////////////////////////////////////////////////////////
58
// CMultiLineEditDialog dialog
59
 
60
const CMultiLineEditDialog::DlgData CMultiLineEditDialog::data={
61
  {DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU, 0,  3, 0, 0,  294,  170}, // # items
62
 
63
  0x0000, // menu
64
  0x0000, // class 
65
  0x0000, // title
66
  {
67
    {
68
      {WS_VISIBLE | WS_TABSTOP | WS_CHILD | BS_PUSHBUTTON | BS_DEFPUSHBUTTON,0,183,7,50,14,IDOK},
69
      0xffff, 0x0080, // class (button)
70
      0x0000,         // title
71
      0x0000,         // creation data
72
      0x0000          // alignment
73
    },
74
 
75
    {
76
      {WS_VISIBLE | WS_TABSTOP | WS_CHILD | BS_PUSHBUTTON,0,  237,  7,  50,  14,  IDCANCEL},
77
      0xffff, 0x0080, // class (button)
78
      0x0000,         // title
79
      0x0000,         // creation data 
80
      0x0000          // alignment
81
    },
82
 
83
    {
84
      {WS_VISIBLE | WS_TABSTOP | WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL,0,  7,  24,  280,  139,  42 /* replaced by m_idEdit */},
85
      0xffff, 0x0081, // class (edit)
86
      0x0000,         // title
87
      0x0000,         // creation data
88
      0x0000          // alignment
89
    }
90
  }
91
};
92
 
93
CMultiLineEditDialog::CMultiLineEditDialog(CWnd* pParent /*=NULL*/,UINT idEdit)
94
        : CeCosDialog(),
95
  m_idEdit(idEdit)
96
{
97
  m_data=data;
98
  m_data.ctrl[2].dit.id=(WORD)m_idEdit; // set the id of the edit control according to parent's wishes (typically to allow CSH to work)
99
  InitModalIndirect(&m_data.dtdlg,pParent);
100
        //{{AFX_DATA_INIT(CMultiLineEditDialog)
101
        m_strText = _T("");
102
        //}}AFX_DATA_INIT
103
}
104
 
105
void CMultiLineEditDialog::DoDataExchange(CDataExchange* pDX)
106
{
107
        CeCosDialog::DoDataExchange(pDX);
108
        //{{AFX_DATA_MAP(CMultiLineEditDialog)
109
        //}}AFX_DATA_MAP
110
}
111
 
112
 
113
BEGIN_MESSAGE_MAP(CMultiLineEditDialog, CeCosDialog)
114
        //{{AFX_MSG_MAP(CMultiLineEditDialog)
115
        //}}AFX_MSG_MAP
116
END_MESSAGE_MAP()
117
 
118
/////////////////////////////////////////////////////////////////////////////
119
// CMultiLineEditDialog message handlers
120
 
121
BOOL CMultiLineEditDialog::OnInitDialog()
122
{
123
        CeCosDialog::OnInitDialog();
124
  SetWindowText(_T("String Edit"));
125
        SetDlgItemText(IDOK,_T("OK"));
126
        SetDlgItemText(IDCANCEL,_T("Cancel"));
127
  SetDlgItemText(m_idEdit,m_strText);
128
        return TRUE;  // return TRUE unless you set the focus to a control
129
                      // EXCEPTION: OCX Property Pages should return FALSE
130
}
131
 
132
void CMultiLineEditDialog::OnOK()
133
{
134
  GetDlgItemText(m_idEdit,m_strText);
135
  CeCosDialog::OnOK();
136
}

powered by: WebSVN 2.1.0

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