Rev 1 | Blame | Compare with Previous | Last modification | View Log | Download
// MaskEd.h : header file///////////////////////////////////////////////////////////////////////////////// CMaskEdit class#ifndef _MASKDEFINE_#define _MASKDEFINE_class CMaskEdit : public CEdit{DECLARE_DYNAMIC(CMaskEdit)// Constructorspublic:CMaskEdit();// AttributesBOOL m_bUseMask;BOOL m_isdate; //added thisBOOL m_bisTime;CString m_str; //added thisCString m_strMask;CString m_strLiteral;CString m_strValid;BOOL m_bMaskKeyInProgress;CString m_strHours;CString m_strMins;CString m_strMaskLiteral;// OperationsBOOL CheckChar(UINT nChar);void SetMask(LPCSTR lpMask, LPCSTR lpLiteral = NULL, LPCSTR lpValid = NULL);void SendChar(UINT nChar);// Implementationpublic:protected:// Generated message map functions//{{AFX_MSG(CMaskEdit)afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);//}}AFX_MSGDECLARE_MESSAGE_MAP()};class CDateEdit : public CMaskEdit{DECLARE_DYNAMIC(CDateEdit)// Constructorspublic:CDateEdit();// Implementationpublic:void SetDate(COleDateTime& Date);COleDateTime GetDate();protected:// Generated message map functions//{{AFX_MSG(CDateEdit)//}}AFX_MSGDECLARE_MESSAGE_MAP()};class CTimeEdit : public CMaskEdit{DECLARE_DYNAMIC(CTimeEdit)// Constructorspublic:CTimeEdit();// Implementationpublic:void SetTime(COleDateTime& Date);void SetTime(CString Date);COleDateTime GetTime();CString GetTimeStr();void SetHours(int hrs);void SetMins(int mins);protected:// Generated message map functions//{{AFX_MSG(CTimeEdit)//}}AFX_MSGDECLARE_MESSAGE_MAP()};void AFXAPI DDX_OleDate(CDataExchange* pDX, int nIDC, CDateEdit& rControl, COleDateTime& Date);//added the line belowvoid AFXAPI DDX_OleDate(CDataExchange* pDX, int nIDC, CTimeEdit& rControl, COleDateTime& Date);#endif