⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 segyview.cpp

📁 使用VC读取地震数据文件
💻 CPP
字号:
// SegYView.cpp : implementation of the CSegYView class
//

#include "stdafx.h"
#include "SegY.h"


#include "SegYDoc.h"
#include "SegYView.h"
#include "ReadHeader.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSegYView

IMPLEMENT_DYNCREATE(CSegYView, CView)

BEGIN_MESSAGE_MAP(CSegYView, CView)
	//{{AFX_MSG_MAP(CSegYView)
	ON_COMMAND(ID_SHOWHEAD, OnShowhead)
	//}}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()

/////////////////////////////////////////////////////////////////////////////
// CSegYView construction/destruction

CSegYView::CSegYView()
{
}

CSegYView::~CSegYView()
{
	//CReadHeader dlg;
	
}

BOOL CSegYView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs
  
	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CSegYView drawing

void CSegYView::OnDraw(CDC* pDC)
{
	CSegYDoc* pDoc = (CSegYDoc*)GetDocument();
	ASSERT_VALID(pDoc);
}

/////////////////////////////////////////////////////////////////////////////
// CSegYView printing

BOOL CSegYView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CSegYView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CSegYView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CSegYView diagnostics

#ifdef _DEBUG
void CSegYView::AssertValid() const
{
	CView::AssertValid();
}

void CSegYView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CSegYDoc* CSegYView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSegYDoc)));
	return (CSegYDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CSegYView message handlers

void CSegYView::OnShowhead() 
{  
    CReadHeader ReadHeadDlg;
    ReadHeadDlg.DoModal();

	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -