-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathPanel.h
64 lines (54 loc) · 1.38 KB
/
Panel.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
// Panel.h: interface for the CPanel class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PANEL_H__4937E4A4_9A4F_412B_B965_4F7649CADB3F__INCLUDED_)
#define AFX_PANEL_H__4937E4A4_9A4F_412B_B965_4F7649CADB3F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CPanel
{
public:
void InitDraw(HDC hDC);
int GetHeight();
int GetWidth();
RECT GetInfoRect();
RECT GetGround();
int GetGcy();
int GetGcx();
void BuildPanel();
void DrawPanel(HDC hDC);
CPanel();
virtual ~CPanel();
int GetGx(){return m_gx;}
int GetGy(){return m_gy;}
private:
int m_gy;
int m_gx;
RECT m_groundRect;
RECT m_infoRect;
int m_gcx;
int m_gcy;
HPEN infopen;
HPEN groundpen;
HBRUSH groundbrush;
HBRUSH infobrush;
};
const int GROUNDLEFT =0;
const int GROUNDRIGHT =WINWIDTH-100;
const int GROUNDTOP =0;
const int GROUNDBUTTOM =WINHEIGHT;
const int INFOLEFT =GROUNDRIGHT;
const int INFORIGHT =WINWIDTH;
const int INFOTOP =0;
const int INFOBUTTOM=WINHEIGHT;
const int GRIDXNUMBER=20;
const int GRIDYNUMBER=20;
const COLORREF GROUNDBORDERCOLOR =RGB(255,255,0);
const COLORREF GROUNDFACECOLOR =RGB(0,0,0);
const int GROUNDWIDE=2;
const DWORD INFOBORDERCOLOR =RGB(100,100,255);
const DWORD INFOFACECOLOR =RGB(200,200,200);
const int INFOWIDE=2;
extern HWND hWnd;
#endif // !defined(AFX_PANEL_H__4937E4A4_9A4F_412B_B965_4F7649CADB3F__INCLUDED_)