?? datashowdoc.cpp
字號:
// DataShowDoc.cpp : implementation file
//
#include "stdafx.h"
#include "VCStyle.h"
#include "DataShowDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "data.h"
#include "DataShowView.h"
/////////////////////////////////////////////////////////////////////////////
// CDataShowDoc
IMPLEMENT_DYNCREATE(CDataShowDoc, CDocument)
CDataShowDoc::CDataShowDoc()
{
m_addr = 255;
m_ch = 255;
}
BOOL CDataShowDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
return TRUE;
}
CDataShowDoc::~CDataShowDoc()
{
}
BEGIN_MESSAGE_MAP(CDataShowDoc, CDocument)
//{{AFX_MSG_MAP(CDataShowDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDataShowDoc diagnostics
#ifdef _DEBUG
void CDataShowDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CDataShowDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CDataShowDoc serialization
void CDataShowDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CDataShowDoc commands
BOOL CDataShowDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
UINT addr,ch;
//lpszPathName格式:"模塊地址,通道號"
sscanf(lpszPathName,"%d,%d",&addr,&ch);
m_addr = addr;
m_ch = ch;
if(m_addr>=MAX_MODELS ||
m_ch >= MAX_CHANS){
AfxMessageBox("數據通道錯!");
return FALSE;
}
// if (!CDocument::OnOpenDocument(NULL))
// return FALSE;
if (!CDocument::OnNewDocument())
return FALSE;
return TRUE;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -