home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Troubleshooting Netware Systems
/
CSTRIAL0196.BIN
/
attach
/
msj
/
v10n08
/
mfcpart3.exe
/
TICTAC.H
< prev
Wrap
C/C++ Source or Header
|
1995-08-01
|
875b
|
39 lines
class CMyApp : public CWinApp
{
public:
BOOL InitInstance ();
};
class CMainWindow : public CWnd
{
private:
CRect m_rect[9]; // Rectangles denoting grid squares
int m_nNextChar; // Next character (EX for X or OH for O)
int m_nGameGrid[9]; // The game grid (0=empty square)
int GetRectID (CPoint);
void DrawBoard (CDC*);
void DrawX (CDC*, int);
void DrawO (CDC*, int);
void ResetGame ();
void CheckForGameOver ();
int IsWinner ();
BOOL IsDraw ();
public:
CMainWindow ();
protected:
void PostNcDestroy ();
afx_msg void OnPaint ();
afx_msg void OnLButtonDown (UINT, CPoint);
afx_msg void OnLButtonDblClk (UINT, CPoint);
afx_msg void OnRButtonDown (UINT, CPoint);
DECLARE_MESSAGE_MAP ()
};
#define EX 1
#define OH 2