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
DrawCoinDoc.cpp
Package: DrawCoin.rar [view]
Upload User: zbkailong
Upload Date: 2022-05-22
Package Size: 1896k
Code Size: 2k
Category:
Graph Drawing
Development Platform:
Visual C++
- // DrawCoinDoc.cpp : implementation of the CDrawCoinDoc class
- //
- #include "stdafx.h"
- #include "DrawCoin.h"
- #include "DrawCoinDoc.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CDrawCoinDoc
- IMPLEMENT_DYNCREATE(CDrawCoinDoc, CDocument)
- BEGIN_MESSAGE_MAP(CDrawCoinDoc, CDocument)
- //{{AFX_MSG_MAP(CDrawCoinDoc)
- ON_COMMAND(ID_COIN_ADD, OnCoinAdd)
- ON_COMMAND(ID_COIN_SUB, OnCoinSub)
- ON_UPDATE_COMMAND_UI(ID_COIN_SUB, OnUpdateCoinSub)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CDrawCoinDoc construction/destruction
- CDrawCoinDoc::CDrawCoinDoc()
- {
- // TODO: add one-time construction code here
- }
- CDrawCoinDoc::~CDrawCoinDoc()
- {
- }
- BOOL CDrawCoinDoc::OnNewDocument()
- {
- if (!CDocument::OnNewDocument())
- return FALSE;
- // TODO: add reinitialization code here
- // (SDI documents will reuse this document)
- return TRUE;
- }
- /////////////////////////////////////////////////////////////////////////////
- // CDrawCoinDoc serialization
- void CDrawCoinDoc::Serialize(CArchive& ar)
- {
- if (ar.IsStoring())
- {
- // TODO: add storing code here
- }
- else
- {
- // TODO: add loading code here
- }
- }
- /////////////////////////////////////////////////////////////////////////////
- // CDrawCoinDoc diagnostics
- #ifdef _DEBUG
- void CDrawCoinDoc::AssertValid() const
- {
- CDocument::AssertValid();
- }
- void CDrawCoinDoc::Dump(CDumpContext& dc) const
- {
- CDocument::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CDrawCoinDoc commands
- void CDrawCoinDoc::DeleteContents()
- {
- // TODO: Add your specialized code here and/or call the base class
- m_nCoins=0;
- CDocument::DeleteContents();
- }
- void CDrawCoinDoc::OnCoinAdd()
- {
- // TODO: Add your command handler code here
- m_nCoins++;
- UpdateAllViews(NULL);
- }
- void CDrawCoinDoc::OnCoinSub()
- {
- // TODO: Add your command handler code here
- if(m_nCoins>0) m_nCoins--;
- UpdateAllViews(NULL);
- }
- void CDrawCoinDoc::OnUpdateCoinSub(CCmdUI* pCmdUI)
- {
- // TODO: Add your command update UI handler code here
- if (m_nCoins<1) pCmdUI->Enable(FALSE);
- else pCmdUI->Enable(TRUE);
- }