
/***************************************************************************
**
**    $Header:   D:/EPSLDV1/SRC/LOG/MYEDIT2.H__   1.8   20 Jun 1996 09:28:02   ZJRD  $
**
**    $Log:   D:/EPSLDV1/SRC/LOG/MYEDIT2.H__  $
** 
**    Rev 1.8   20 Jun 1996 09:28:02   ZJRD
** EasyPack/SLD Version 1.20a
** 
**    Rev 1.6   10 Jun 1996 10:22:40   ZJRD
** EasyPack/SLD Version 1.20
** 
**    Rev 1.4   29 May 1996 09:33:32   ZJRD
** No change.
** 
**    Rev 1.3   16 May 1996 09:05:38   ZJRD
** EasyPack/SLD Version 1.94
** 
**    Rev 1.2   10 May 1996 09:11:40   ZJRD
** No change.
** 
**    Rev 1.1   02 May 1996 10:23:30   ZJRD
** EasyPack/SLD Version 1.92
** 
**    Rev 1.31   18 Apr 1996 12:57:14   Shirley
** No change.
** 
**    Rev 1.30   12 Apr 1996 10:42:38   Shirley
** EasyPack/SLD Version 1.90
** 
**    Rev 1.28   15 Feb 1996 08:54:40   Shirley
** No change.
** 
**    Rev 1.27   12 Feb 1996 14:02:54   Shirley
** No change.
** 
**    Rev 1.26   06 Feb 1996 15:28:10   Shirley
** No change.
** 
**    Rev 1.25   06 Feb 1996 13:43:46   Shirley
** No change.
** 
**    Rev 1.24   01 Feb 1996 10:16:42   Shirley
** No change.
** 
**    Rev 1.23   26 Jan 1996 09:19:20   Shirley
** No change.
** 
**    Rev 1.22   25 Jan 1996 13:19:12   Shirley
** No change.
** 
**    Rev 1.21   24 Jan 1996 10:32:20   Shirley
** No change.
** 
**    Rev 1.20   23 Jan 1996 11:24:10   Shirley
** EasypPack/SLD Version 0.34c
** 
**    Rev 1.19   18 Jan 1996 10:08:54   Shirley
** No change.
** 
**    Rev 1.18   15 Jan 1996 16:11:54   Shirley
** No change.
** 
**    Rev 1.17   04 Jan 1996 11:14:24   Shirley
** EasyPack/SLD Version 0.34
** 
**    Rev 1.16   30 Nov 1995 09:14:38   Shirley
** No change.
** 
**    Rev 1.15   28 Nov 1995 15:29:10   Shirley
** No change.
** 
**    Rev 1.14   21 Nov 1995 11:21:22   Shirley
** No change.
** 
**    Rev 1.13   13 Nov 1995 09:24:40   Shirley
** No change.
** 
**    Rev 1.12   12 Nov 1995 11:28:56   Shirley
** No change.
** 
**    Rev 1.11   08 Nov 1995 16:31:58   Shirley
** No change.
** 
**    Rev 1.10   08 Nov 1995 12:45:50   Shirley
** No change.
** 
**    Rev 1.9   02 Nov 1995 10:08:00   Shirley
** No change.
** 
**    Rev 1.8   27 Oct 1995 16:45:16   Shirley
** No change.
** 
**    Rev 1.7   27 Oct 1995 13:47:36   Shirley
** No change.
** 
**    Rev 1.6   25 Oct 1995 14:30:26   Shirley
** No change.
** 
**    Rev 1.5   18 Oct 1995 14:51:50   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:50   Shirley
** No change.
** 
**    Rev 1.1   15 Sep 1995 09:48:32   Shirley
** EasyPack/SLDV0.1a 
** 
**    Rev 1.0   07 Sep 1995 09:53:50   Shirley
** Initial revision.
**
****************************************************************************/

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

////////////////////////////////////////////
// myedit2.h
// Lane Li
// 95/7
////////////////////////////////////////////
#ifndef _MYEDIT2_
#define _MYEDIT2

class CMyEdit2 : public CEdit
{
protected:
    WORD    m_wParseStyle;      // C++ member data
    long    m_nMin, m_nMax;           
    
public:
    UINT  m_uAddOrLen;
    UINT  m_uWhichEdit;
// Construction
    CMyEdit2();

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

// Implementation
protected:
    //{{AFX_MSG(CMyEdit2)
    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)////////////////////////////////////
