Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
DrawShape.cpp
Package: DrawSys.zip [view]
Upload User: mosfetic
Upload Date: 2022-06-16
Package Size: 4612k
Code Size: 1k
Category:
GDI-Bitmap
Development Platform:
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;
- }