www.pudn.com > LoadMachineCode111.rar > LoadMachineCodeView.cpp


// LoadMachineCodeView.cpp : implementation of the CLoadMachineCodeView class 
// 
 
#include "stdafx.h" 
#include "LoadMachineCode.h" 
#include "DownDialog.h" 
#include "LoadMachineCodeDoc.h" 
#include "LoadMachineCodeView.h" 
#include "Loadmachcode.h" 
#include "Onlinelogin.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CLoadMachineCodeView 
 
IMPLEMENT_DYNCREATE(CLoadMachineCodeView, CView) 
 
BEGIN_MESSAGE_MAP(CLoadMachineCodeView, CView) 
	//{{AFX_MSG_MAP(CLoadMachineCodeView) 
	ON_COMMAND(IDM_LOADMACHINECODE, OnLoadmachinecode) 
	ON_COMMAND(IDM_LOADPROGRAM, OnLoadprogram) 
	ON_COMMAND(IDM_ONLINECOUNTZFMM, OnOnlinecountzfmm) 
	//}}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() 
 
///////////////////////////////////////////////////////////////////////////// 
// CLoadMachineCodeView construction/destruction 
 
CLoadMachineCodeView::CLoadMachineCodeView() 
{ 
	// TODO: add construction code here 
 
	m_pDlg=new CLoadmachcode(this); 
} 
 
CLoadMachineCodeView::~CLoadMachineCodeView() 
{ 
	delete m_pDlg; 
} 
 
BOOL CLoadMachineCodeView::PreCreateWindow(CREATESTRUCT& cs) 
{ 
	// TODO: Modify the Window class or styles here by modifying 
	//  the CREATESTRUCT cs 
 
	return CView::PreCreateWindow(cs); 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CLoadMachineCodeView drawing 
 
void CLoadMachineCodeView::OnDraw(CDC* pDC) 
{ 
	CLoadMachineCodeDoc* pDoc = GetDocument(); 
	ASSERT_VALID(pDoc); 
	// TODO: add draw code for native data here 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CLoadMachineCodeView printing 
 
BOOL CLoadMachineCodeView::OnPreparePrinting(CPrintInfo* pInfo) 
{ 
	// default preparation 
	return DoPreparePrinting(pInfo); 
} 
 
void CLoadMachineCodeView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) 
{ 
	// TODO: add extra initialization before printing 
} 
 
void CLoadMachineCodeView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) 
{ 
	// TODO: add cleanup after printing 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CLoadMachineCodeView diagnostics 
 
#ifdef _DEBUG 
void CLoadMachineCodeView::AssertValid() const 
{ 
	CView::AssertValid(); 
} 
 
void CLoadMachineCodeView::Dump(CDumpContext& dc) const 
{ 
	CView::Dump(dc); 
} 
 
CLoadMachineCodeDoc* CLoadMachineCodeView::GetDocument() // non-debug version is inline 
{ 
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CLoadMachineCodeDoc))); 
	return (CLoadMachineCodeDoc*)m_pDocument; 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CLoadMachineCodeView message handlers 
 
void CLoadMachineCodeView::OnLoadmachinecode()  
{ 
	//DO: Add your command handler code here 
	if(m_pDlg->GetSafeHwnd()==0){ 
		m_pDlg->Create(); 
	} 
	m_pDlg->ShowWindow(SW_SHOW); 
 
 
} 
 
void CLoadMachineCodeView::OnLoadprogram()  
{ 
	// TODO: Add your command handler code here 
	CDownDialog downdlg; 
	downdlg.DoModal(); 
} 
 
void CLoadMachineCodeView::OnOnlinecountzfmm()  
{ 
	// TODO: Add your command handler code here 
	COnlinelogin onlineDlg; 
	onlineDlg.DoModal(); 
}