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 // CellEdit.cpp : implementation file
34 static char THIS_FILE[] = __FILE__;
37 /////////////////////////////////////////////////////////////////////////////
40 CCell::CCell(LPCTSTR pszInitialValue):
41 m_strInitialValue(pszInitialValue)
50 BEGIN_MESSAGE_MAP(CCell, CWnd)
51 //{{AFX_MSG_MAP(CCell)
57 /////////////////////////////////////////////////////////////////////////////
58 // CCell message handlers
60 BOOL CCell::PreTranslateMessage(MSG* pMsg)
62 if(pMsg->message==WM_KEYDOWN){
65 GetParent()->SendMessage(WM_CANCEL_EDIT,0);
68 GetParent()->SendMessage(WM_CANCEL_EDIT,1);
75 return CWnd::PreTranslateMessage(pMsg);
78 BOOL CCell::Create(DWORD, const RECT&, CWnd*, UINT, CCreateContext*)
84 void CCell::OnChar(UINT nChar, UINT, UINT )
88 GetParent()->SendMessage(WM_CANCEL_EDIT,1);
91 GetParent()->SendMessage(WM_CANCEL_EDIT,0);
94 // Prevent beep: do not pass message back