
/***************************************************************************
**
**    $Header:   D:/EPSLDV1/SRC/LOG/MYEDIT.H__   1.8   20 Jun 1996 09:29:14   ZJRD  $
**
**    $Log:   D:/EPSLDV1/SRC/LOG/MYEDIT.H__  $
** 
**    Rev 1.8   20 Jun 1996 09:29:14   ZJRD
** EasyPack/SLD Version 1.20a
** 
**    Rev 1.6   10 Jun 1996 10:23:52   ZJRD
** EasyPack/SLD Version 1.20
** 
**    Rev 1.4   29 May 1996 09:35:22   ZJRD
** No change.
** 
**    Rev 1.3   16 May 1996 09:08:26   ZJRD
** No change.
** 
**    Rev 1.2   10 May 1996 09:08:56   ZJRD
** No change.
** 
**    Rev 1.1   02 May 1996 10:24:52   ZJRD
** EasyPack/SLD Version 1.92
** 
**    Rev 1.31   18 Apr 1996 13:00:34   Shirley
** No change.
** 
**    Rev 1.30   12 Apr 1996 10:37:38   Shirley
** EasyPack/SLD Version 1.90
** 
**    Rev 1.28   15 Feb 1996 08:52:08   Shirley
** No change.
** 
**    Rev 1.27   12 Feb 1996 14:06:40   Shirley
** No change.
** 
**    Rev 1.26   06 Feb 1996 15:33:10   Shirley
** No change.
** 
**    Rev 1.25   06 Feb 1996 13:48:06   Shirley
** No change.
** 
**    Rev 1.24   01 Feb 1996 10:12:26   Shirley
** No change.
** 
**    Rev 1.23   26 Jan 1996 09:12:08   Shirley
** No change.
** 
**    Rev 1.22   25 Jan 1996 13:12:50   Shirley
** No change.
** 
**    Rev 1.21   24 Jan 1996 10:36:26   Shirley
** No change.
** 
**    Rev 1.20   23 Jan 1996 11:24:52   Shirley
** No change.
** 
**    Rev 1.19   18 Jan 1996 10:09:12   Shirley
** No change.
** 
**    Rev 1.18   15 Jan 1996 16:12:14   Shirley
** No change.
** 
**    Rev 1.17   04 Jan 1996 11:14:44   Shirley
** No change.
** 
**    Rev 1.16   30 Nov 1995 09:09:56   Shirley
** No change.
** 
**    Rev 1.15   28 Nov 1995 15:30:46   Shirley
** No change.
** 
**    Rev 1.14   21 Nov 1995 11:23:50   Shirley
** No change.
** 
**    Rev 1.13   13 Nov 1995 09:26:10   Shirley
** No change.
** 
**    Rev 1.12   12 Nov 1995 11:29:50   Shirley
** No change.
** 
**    Rev 1.11   08 Nov 1995 16:31:40   Shirley
** No change.
** 
**    Rev 1.10   08 Nov 1995 12:40:12   Shirley
** No change.
** 
**    Rev 1.9   02 Nov 1995 10:07:30   Shirley
** No change.
** 
**    Rev 1.8   27 Oct 1995 16:47:08   Shirley
** No change.
** 
**    Rev 1.7   27 Oct 1995 13:48:20   Shirley
** No change.
** 
**    Rev 1.6   25 Oct 1995 14:29:38   Shirley
** No change.
** 
**    Rev 1.5   18 Oct 1995 14:48:08   Shirley
** No change.
** 
**    Rev 1.4   13 Oct 1995 13:22:50   Shirley
** No change.
** 
**    Rev 1.3   29 Sep 1995 09:49:46   Shirley
** No change.
** 
**    Rev 1.2   20 Sep 1995 10:52:48   Shirley
** No change.
** 
**    Rev 1.1   15 Sep 1995 09:48:30   Shirley
** EasyPack/SLDV0.1a 
** 
**    Rev 1.0   07 Sep 1995 09:53:50   Shirley
** Initial revision.
**
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name:  MYEDIT.H
//
//  Description:The header file for the class: CMyEdit
//
//  Author:     Lane Li
//
//  Date:       09/10/95
//
//  Modification:
//
//      1. 09/10/95, Initial version
//
//
//  Copyright (C) 1995 Microtek International. All rights reserved.
//
/////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////
// myedit.h
// Lane Li
// 95/7
////////////////////////////////////////////
#ifndef _MYEDIT_
#define _MYEDIT_

class CMyEdit : public CEdit
{
protected:
    WORD    m_wParseStyle;      // C++ member data
    long    m_nMin, m_nMax;           

public:
    static CEdit* m_edit1;
    static CEdit* m_edit2;    
    
public:
// Construction
    CMyEdit();

    BOOL Create(DWORD dwStyle /* includes PES_ style*/, const RECT& rect,
        CWnd* pParentWnd, UINT nID);
    BOOL SubclassEdit(UINT nID, CWnd* pParent, WORD wParseStyle);
    BOOL SubclassEdit2(UINT nID, CWnd* pParent, WORD wParseStyle);
    static BOOL RegisterControlClass();
    void SetRange(int nMin, int nMax) 
    { 
        ASSERT(nMax >= nMin);
        m_nMin = nMin; m_nMax = nMax; 
    }
    
// Overridables
    virtual void OnBadInput();

// Implementation
protected:
    //{{AFX_MSG(CMyEdit)
    afx_msg void OnChar(UINT, UINT, UINT); // for character validation
    afx_msg void OnVScroll(UINT, UINT, CScrollBar*); // for spin buttons
    //}}AFX_MSG

    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////
// Parsed edit control sub-styles

#define PES_NUMBERS         0x0001
#define PES_LETTERS         0x0002
#define PES_OTHERCHARS      0x0004
#define PES_ALL             0xFFFF

///////////////////////////////////////////////////////////////////
// Extra control notifications

// above the range for normal EN_ messages
#define PEN_ILLEGALCHAR     0x8000
            // sent to parent when illegal character hit
            // return 0 if you want parsed edit to beep

#endif
//////////////////////////////(EOF)////////////////////////////////////
