QueenPanel.h
资源名称:NQueen.rar [点击查看]
上传用户:hncsjd
上传日期:2022-07-08
资源大小:3772k
文件大小:1k
源码类别:
其他智力游戏
开发平台:
Visual C++
- #if !defined(AFX_QUEENPANEL_H__E424C34A_14F8_4EF0_A4CC_1B065FA861F8__INCLUDED_)
- #define AFX_QUEENPANEL_H__E424C34A_14F8_4EF0_A4CC_1B065FA861F8__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // QueenPanel.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CQueenPanel window
- //利用向导生成的、从CStatic类派生下来的自定义MFC类
- class CQueenPanel : public CStatic
- {
- // Construction
- public:
- CQueenPanel( );
- CQueenPanel(int size);
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CQueenPanel)
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CQueenPanel();
- void SetSize(int size);
- void SetQueen(int *newq);
- void SetQueen(int row, int col);
- // Generated message map functions
- protected:
- //{{AFX_MSG(CQueenPanel)
- afx_msg void OnPaint();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- void DrawBoard(CDC *pDC, int size, int cell); //画棋盘
- int *queen; //动态申请数组空间,记录皇后的位置,queen[i]表示第i行皇后的所在列的位置。
- int N; //N皇后问题的规模
- HANDLE queen_mutex; //互斥对象的句柄
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_QUEENPANEL_H__E424C34A_14F8_4EF0_A4CC_1B065FA861F8__INCLUDED_)