- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
DrawShape.cpp
资源名称:DrawSys.zip [点击查看]
上传用户:mosfetic
上传日期:2022-06-16
资源大小:4612k
文件大小:1k
源码类别:
GDI/图象编程
开发平台:
Visual C++
- // DrawShape.cpp: implementation of the CDrawShape class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "DrawSys.h"
- #include "DrawShape.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- IMPLEMENT_SERIAL(CDrawShape, CObject, 1)
- CDrawShape::CDrawShape()
- {
- }
- CDrawShape::~CDrawShape()
- {
- }
- void CDrawShape::Serialize(CArchive& ar)
- {
- if (ar.IsStoring())
- {
- // TODO: add storing code here
- ar << m_tmCreate << m_iID;
- }
- else
- {
- // TODO: add loading code here
- ar >> m_tmCreate >> m_iID;
- }
- }
- void CDrawShape::MyFormatString(CString& strText, int i)
- {
- strText.Empty();
- if(i < 10)
- {
- strText.Format("00%d#", i);
- }
- else if(i < 100)
- {
- strText.Format("0%d#", i);
- }
- else
- {
- strText.Format("%d#", i);
- }
- }
- LONG CDrawShape::MIN(LONG num1, LONG num2)
- {
- if(num1 > num2)
- return num2;
- return num1;
- }
- LONG CDrawShape::MAX(LONG num1, LONG num2)
- {
- if(num1 > num2)
- return num1;
- return num2;
- }