www.pudn.com > CHECKER.zip > CHECKDOC.H


// checkdoc.h : interface of the CCheckerDoc class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
 
 
#include "stateary.h" 
 
class CCheckerDoc : public CDocument 
{ 
protected: // create from serialization only 
	CCheckerDoc(); 
	DECLARE_DYNCREATE(CCheckerDoc) 
	CStateArray2 m_statearray; 
	CPoint m_selected; 
	BOOL m_selectflag; 
	unsigned movenum; // move number 
// Attributes 
public: 
   BOOL GetSelect(CPoint &pt) { pt=m_selected; return m_selectflag; }; 
   void SetSelect(CPoint pt) { m_selected=pt; m_selectflag=TRUE; UpdateAllViews(NULL,(LPARAM)&pt); }; 
   void ClrSelect(void) { if (m_selectflag) m_selectflag=FALSE; UpdateAllViews(NULL,(LPARAM)&m_selected); }; 
   int Count(STATE typ); 
// Operations 
public: 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CCheckerDoc) 
	public: 
	virtual BOOL OnNewDocument(); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	virtual ~CCheckerDoc(); 
	virtual void Serialize(CArchive& ar);   // overridden for document i/o 
	STATE CellState(int,int); 
	void SetCellState(int x,int y,STATE s); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CCheckerDoc) 
	afx_msg void OnDebugwin(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
/////////////////////////////////////////////////////////////////////////////