
/***************************************************************************
**
**    $Header:   D:/PICSLDV/SRC/LOG/VARTYPE.H__   1.14   09 Jan 1997 14:26:42   ZJRD  $
**
**    $Log:   D:/PICSLDV/SRC/LOG/VARTYPE.H__  $
** 
**    Rev 1.14   09 Jan 1997 14:26:42   ZJRD
** No change.
** 
**    Rev 1.13   13 Dec 1996 11:21:34   ZJRD
** No change.
** 
**    Rev 1.12   22 Nov 1996 11:02:34   ZJRD
** No change.
** 
**    Rev 1.11   11 Nov 1996 12:49:48   ZJRD
** No change.
** 
**    Rev 1.10   06 Nov 1996 13:01:48   ZJRD
** No change.
** 
**    Rev 1.9   02 Nov 1996 09:46:10   ZJRD
** No change.
** 
**    Rev 1.8   30 Oct 1996 12:48:24   ZJRD
** No change.
** 
**    Rev 1.7   28 Oct 1996 09:41:20   ZJRD
** No change.
** 
**    Rev 1.6   21 Oct 1996 09:15:42   ZJRD
** No change.
** 
**    Rev 1.5   09 Oct 1996 13:45:16   ZJRD
** No change.
** 
**    Rev 1.4   23 Sep 1996 10:31:38   ZJRD
** No change.
** 
**    Rev 1.3   06 Sep 1996 13:45:22   ZJRD
** No change.
** 
**    Rev 1.2   02 Sep 1996 11:26:30   ZJRD
** No change.
** 
**    Rev 1.1   15 Aug 1996 10:05:04   ZJRD
** No change.
** 
**    Rev 1.0   13 Aug 1996 09:17:56   ZJRD
** Initial revision.
** 
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name: VARTYPE.H
//
//  Description: The header file for the class: CVarTypeDialog.
//
//  Author: Chen Jun
//
//  Date: 07/25/95
//
//  Modification:
//      1. 07/25/95, Initial version of the class: CVarTypeDialog.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _VARTYPE_
#define _VARTYPE_


/////////////////////////////////////////////////////////////////////////////
// CVarTypeDialog dialog

class CVarTypeDialog : public CDialog
{
// Construction
public:
    CVarTypeDialog(CWnd* pParent = NULL);   // standard constructor
    virtual ~CVarTypeDialog();

// Dialog Data
    //{{AFX_DATA(CVarTypeDialog)
    enum { IDD = IDD_DIALOG_VAR_TYPE };
    CButton m_btnOK;
    //}}AFX_DATA
    
protected:
    CString m_strType;
    
    int m_nFontWidth;
    int m_nFontHeight;

    enum {
        openWidth = 16,
        openHeight = 13,
        closeWidth = 16,
        closeHeight = 13
    };
    CBitmap m_bmpOpen;
    CBitmap m_bmpClose;

    enum {
        noSign = 0,
        openSign,
        closeSign
    };
    int m_nBmpStatus;
    
    enum {
        noError = 0,        // No error.
        insufficientMemory, // Insufficient memory.
        bmpOpen,            // Cannot load VAR_OPEN bitmap.
        bmpClose,           // Cannot load VAR_CLOSE bitmap.
        maxError = 10       // Limition of error ID.
    };
    BOOL m_nErrorID;

// Implementation
protected:
    void DisplayBitmap(CDC* pDC, const int nRow, const int nCol);
    void ClearBitmap(CDC* pDC, const int nRow, const int nCol);
    
    void DisplayErrorMessage(void) const;

protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

    // Generated message map functions
    //{{AFX_MSG(CVarTypeDialog)
    virtual void OnOK();
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnPaint();
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

#endif
//////////////////////////////// End of File ////////////////////////////////
