AmazeDoc.h
资源名称:Amaze.rar [点击查看]
上传用户:jygk2008
上传日期:2007-04-06
资源大小:18k
文件大小:2k
源码类别:
系统/网络安全
开发平台:
Visual C++
- // AmazeDoc.h : interface of the CAmazeDoc class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_AMAZEDOC_H__EEA2E9BF_90C8_11D4_A154_89D8A9A95671__INCLUDED_)
- #define AFX_AMAZEDOC_H__EEA2E9BF_90C8_11D4_A154_89D8A9A95671__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #define AMAZEDATA(x, y) (*(m_pData + (2*m_nHeight+2) * (x) + y))
- class CAmazeDoc : public CDocument
- {
- protected: // create from serialization only
- CAmazeDoc();
- DECLARE_DYNCREATE(CAmazeDoc)
- // Attributes
- private:
- long* m_pData;
- long m_nWidth, m_nHeight;
- public:
- long* m_pDisData;
- long m_nDisNum;
- // Operations
- public:
- void CreateAmaze();
- void DisAmaze();
- void DeleteAmaze(){
- if(m_pData){delete [] m_pData; m_pData = NULL; }
- if(m_pDisData){delete [] m_pDisData; m_pDisData = NULL;}
- }
- long AmazeData(int x, int y)
- { return *(m_pData + (2*m_nHeight+2) * (x) + y); }
- void SetWidth(int w)
- { m_nWidth = w; }
- long GetWidth()
- { return m_nWidth; }
- void SetHeight(int h)
- { m_nHeight = h; }
- long GetHeight()
- { return m_nHeight; }
- bool HaveAmaze()
- { return m_pData != NULL; }
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CAmazeDoc)
- public:
- virtual BOOL OnNewDocument();
- virtual void Serialize(CArchive& ar);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CAmazeDoc();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CAmazeDoc)
- // NOTE - the ClassWizard will add and remove member functions here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_AMAZEDOC_H__EEA2E9BF_90C8_11D4_A154_89D8A9A95671__INCLUDED_)