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
shingoesView.cpp
Package: shingoes.rar [view]
Upload User: tdk119
Upload Date: 2008-01-21
Package Size: 51k
Code Size: 3k
Category:
Graph Drawing
Development Platform:
Visual C++
- // shingoesView.cpp : implementation of the CShingoesView class
- //
- #include "stdafx.h"
- #include "shingoes.h"
- #include "shingoesDoc.h"
- #include "shingoesView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CShingoesView
- IMPLEMENT_DYNCREATE(CShingoesView, CView)
- BEGIN_MESSAGE_MAP(CShingoesView, CView)
- //{{AFX_MSG_MAP(CShingoesView)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- // Standard printing commands
- ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CShingoesView construction/destruction
- CShingoesView::CShingoesView()
- {
- // TODO: add construction code here
- }
- CShingoesView::~CShingoesView()
- {
- }
- BOOL CShingoesView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CView::PreCreateWindow(cs);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CShingoesView drawing
- void CShingoesView::OnDraw(CDC* pDC)
- {
- CShingoesDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- CRect rect, rectx, recty;
- GetClientRect(rect);
- rect.DeflateRect(10,10,10,10);
- rectx.left = rect.left;
- rectx.top = rect.bottom - 20;
- rectx.right = rect.right;
- rectx.bottom = rect.bottom;
- recty.left = rect.left;
- recty.top = rect.top;
- recty.right = recty.left + 20;
- recty.bottom = rect.bottom;
- rect.left += 20;
- rect.bottom -= 20;
- graph.SetGraphRect(rect);
- graph.SetXrect(rectx);
- graph.SetYrect(recty);
- graph.SetDataLength(pDoc->GetDataLength());
- graph.SetData(pDoc->GetData());
- graph.SetDC(pDC);
- graph.Paint();
- }
- /////////////////////////////////////////////////////////////////////////////
- // CShingoesView printing
- BOOL CShingoesView::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CShingoesView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add extra initialization before printing
- }
- void CShingoesView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add cleanup after printing
- }
- /////////////////////////////////////////////////////////////////////////////
- // CShingoesView diagnostics
- #ifdef _DEBUG
- void CShingoesView::AssertValid() const
- {
- CView::AssertValid();
- }
- void CShingoesView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- CShingoesDoc* CShingoesView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CShingoesDoc)));
- return (CShingoesDoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CShingoesView message handlers