Shape.h
资源名称:CAD.zip [点击查看]
上传用户:hehe2haha
上传日期:2013-08-16
资源大小:161k
文件大小:1k
源码类别:
CAD
开发平台:
Visual C++
- // Shape.h: interface for the CShape class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_SHAPE_H__DB7F2CCB_B57E_4475_BCB2_141AF81757F2__INCLUDED_)
- #define AFX_SHAPE_H__DB7F2CCB_B57E_4475_BCB2_141AF81757F2__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "iostream.h"
- #include "fstream.h"
- #include "iomanip.h"
- #include "Draw.h"
- #define Rect 4 //Rect为标记圆的半径
- class CShape
- {
- public:
- BOOL isPick; //pick state
- char m_className[255];
- POINT m_ptFirstPos; // first point
- POINT m_ptSecondPos; // second point
- int fnPenStyle; // pen style
- int nWidth; // pen width
- COLORREF crColor ; // pen color
- public:
- CShape();
- virtual ~CShape();
- public:
- virtual void Draw(HDC) {}
- virtual void Save(ostream &) ;
- virtual void Open(istream &) ;
- virtual void SaveClassName(ostream &){}
- virtual BOOL pick(POINT){return 0;}
- virtual void DrawRect(HDC){}
- };
- #endif // !defined(AFX_SHAPE_H__DB7F2CCB_B57E_4475_BCB2_141AF81757F2__INCLUDED_)