-
Notifications
You must be signed in to change notification settings - Fork 2
/
ReversiWnd.h
executable file
·74 lines (58 loc) · 2.04 KB
/
ReversiWnd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#if !defined(_REVERSIWND_H_INCLUDED_)
#define _REVERSIWND_H_INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ReversiWnd.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CReversiWnd window
#include "BoardView.h"
#include "BoardRightView.h"
#define WM_SIZE_CHANGE WM_USER+1300 // 当棋盘的大小发生改变时发送给其他窗口的消息
// 黑白棋窗口尺寸参数
#define WIDTH_RIGHT 140 // 右边窗口宽度
#define HEIGHT_CAPTION (GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYMENU) + GetSystemMetrics(SM_CYFRAME)*2 + 2)
#define USER_TOO_TIP_WIDTH 2000 // 提示工具栏宽度
class CReversiWnd : public CWnd
{
// Construction
public:
CReversiWnd();
//属性
public:
CBoardView * m_wndBoard; // 棋盘窗口
CBoardRightView * m_wndBoardRight; // 棋盘右边窗口
CRect m_rectBoard; // 棋盘大小
CRect m_rectRight; // 棋盘右面操作栏大小
HWND m_hWndSizeChange; // 当棋盘的大小发生改变时需要发送消息通知的窗口句柄
// 操作
public:
void RecalcLayout(BOOL bNotify);
void PartitionClientRect(); // 对主窗口客户区分区
void ShowTopWindow(BOOL nShow); // 显示上边标题栏
void ShowLeftWindow(BOOL nShow); // 显示左边标题栏
void Zoomin(); // 放大棋盘
void Zoomout(); // 缩小棋盘
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CReversiWnd)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CReversiWnd();
// Generated message map functions
protected:
//{{AFX_MSG(CReversiWnd)
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnClose();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(_REVERSIWND_H_INCLUDED_)