📄 test.h
字号:
#if !defined(AFX_TEST_H__6095E87E_8DE3_45AA_9BE4_9FA6C74352ED__INCLUDED_)
#define AFX_TEST_H__6095E87E_8DE3_45AA_9BE4_9FA6C74352ED__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Test.h : header file
//
#include <afxtempl.h>
#include <math.h>
#include "Canvas.h"
#include "XBitmap.h"
#include "Dib.h"
/////////////////////////////////////////////////////////////////////////////
// CTest window
class Pole
{
public:
Pole() : x(0), y(0) {}
Pole(int x, int y) : x(x), y(y){}
int x;
int y;
};
class Zero
{
public:
Zero() : x(0), y(0) {}
Zero(int x, int y) : x(x), y(y){}
int x;
int y;
};
class CTest : public CCanvas
{
// Construction
public:
CTest();
// Attributes
public:
CArray<Pole, Pole&> poles;
CArray<Zero, Zero&> zeros;
bool selected;
int pole;
int mouseX, mouseY;
bool init_done;
int m_border;
CXBitmap nico;
BITMAPINFOHEADER m_bitmap_info;
HBITMAP hBmp;
CBitmap cur;
// Operations
public:
void Paint(CDC *dc);
void Circle(CDC *dc, int x, int y, int radius);
void DrawRect(CDC *dc, int x, int y, int w, int h, COLORREF color);
void DrawRect(CDC *dc, RECT rect, COLORREF color);
void OnMouseExit();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTest)
//}}AFX_VIRTUAL
virtual void PreSubclassWindow();
// Implementation
public:
virtual ~CTest();
// Generated message map functions
protected:
//{{AFX_MSG(CTest)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TEST_H__6095E87E_8DE3_45AA_9BE4_9FA6C74352ED__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -