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
drawDoc.h
Package: GDIUSE.rar [view]
Upload User: jinlangri
Upload Date: 2022-07-17
Package Size: 10774k
Code Size: 4k
Category:
GDI-Bitmap
Development Platform:
Visual C++
- // drawDoc.h : interface of the CDrawDoc class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_DRAWDOC_H__CA9C4914_07B2_11D4_B0C9_5254AB167DFC__INCLUDED_)
- #define AFX_DRAWDOC_H__CA9C4914_07B2_11D4_B0C9_5254AB167DFC__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "stdafx.h"
- class CDrawBase : public CObject
- {
- protected:
- COLORREF m_Color; //图形颜色
- DWORD m_X1, m_Y1, m_X2, m_Y2;//包围矩形
- CDrawBase() {}
- DECLARE_SERIAL(CDrawBase) //序列化声明
- public:
- CRect GetDimRect(); //获得包围矩形
- virtual void Draw(CDC *pDC) {}
- virtual void Serialize(CArchive& ar);
- };
- class CLine : public CDrawBase
- {
- protected:
- DWORD m_Thickness; //直线的线宽
- CLine() {}
- DECLARE_SERIAL(CLine) //序列化声明
- public:
- CLine(int X1, int Y1, int X2, int Y2, COLORREF Color, int Thickness);
- virtual void Draw(CDC *pDC);
- virtual void Serialize(CArchive& ar);
- };
- class CRectangle : public CDrawBase
- {
- protected:
- DWORD m_Thickness; //矩形的线宽
- CRectangle() {}
- DECLARE_SERIAL(CRectangle) //序列化声明
- public:
- CRectangle(int X1, int Y1, int X2, int Y2, COLORREF Color, int Thickness);
- virtual void Draw(CDC *pDC);
- virtual void Serialize(CArchive& ar);
- };
- class CRectFill : public CDrawBase
- {
- protected:
- CRectFill() {}
- DECLARE_SERIAL(CRectFill) //序列化声明
- public:
- CRectFill(int X1, int Y1, int X2, int Y2, COLORREF Color);
- virtual void Draw(CDC *pDC);
- };
- class CRectRound : public CDrawBase
- {
- protected:
- DWORD m_Thickness; //圆角矩形的线宽
- CRectRound() {}
- DECLARE_SERIAL(CRectRound) //序列化声明
- public:
- CRectRound(int X1, int Y1, int X2, int Y2, COLORREF Color, int Thickness);
- virtual void Draw(CDC *pDC);
- virtual void Serialize(CArchive& ar);
- };
- class CRectRoundFill : public CDrawBase
- {
- protected:
- CRectRoundFill() {}
- DECLARE_SERIAL(CRectRoundFill) //序列化声明
- public:
- CRectRoundFill(int X1, int Y1, int X2, int Y2, COLORREF Color);
- virtual void Draw(CDC *pDC);
- };
- class CCircle : public CDrawBase
- {
- protected:
- DWORD m_Thickness; //圆的线宽
- CCircle() {}
- DECLARE_SERIAL(CCircle)//序列化声明
- public:
- CCircle(int X1, int Y1, int X2, int Y2, COLORREF Color, int Thickness);
- virtual void Serialize(CArchive& ar);
- virtual void Draw(CDC *pDC);
- };
- class CCircleFill : public CDrawBase
- {
- protected:
- CCircleFill() {}
- DECLARE_SERIAL(CCircleFill)//序列化声明
- public:
- CCircleFill(int X1, int Y1, int X2, int Y2, COLORREF Color);
- virtual void Draw(CDC *pDC);
- };
- class CText : public CDrawBase
- {
- protected:
- LOGFONT m_lf;
- CString m_String;
- CText() {}
- DECLARE_SERIAL(CText) //序列化声明
- public:
- CText(int X1, int Y1, int X2, int Y2, COLORREF Color, LOGFONT lf, CString str);
- virtual void Draw(CDC *pDC);
- virtual void Serialize(CArchive& ar);
- };
- class CDrawDoc : public CDocument
- {
- protected:
- CTypedPtrArray<CObArray, CDrawBase *> m_DrawArray;
- public:
- void AddDraw(CDrawBase *pDraw);
- CDrawBase *GetDraw(int Index);
- int GetNumDraws();
- protected: // create from serialization only
- CDrawDoc();
- DECLARE_DYNCREATE(CDrawDoc)
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDrawDoc)
- public:
- virtual BOOL OnNewDocument();
- virtual void Serialize(CArchive& ar);
- virtual void DeleteContents();
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CDrawDoc();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CDrawDoc)
- afx_msg void OnEditClearAll();
- afx_msg void OnUpdateEditClearAll(CCmdUI* pCmdUI);
- afx_msg void OnEditUndo();
- afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_DRAWDOC_H__CA9C4914_07B2_11D4_B0C9_5254AB167DFC__INCLUDED_)