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

📄 tgcac_backup.cpp

📁 这是本人两年前兼职为某个公司做的石油钻进设计软件
💻 CPP
字号:
// TGCac.cpp : implementation file
//

#include "stdafx.h"
#include "cvenus.h"
#include "TGCac.h"
#include	"MainFrm.h"

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

/////////////////////////////////////////////////////////////////////////////
// CTGCac

IMPLEMENT_DYNCREATE(CTGCac, CFormView)

CTGCac::CTGCac()
	: CFormView(CTGCac::IDD)
{
	//{{AFX_DATA_INIT(CTGCac)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}

CTGCac::~CTGCac()
{
}

void CTGCac::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CTGCac)
	DDX_Control(pDX, IDC_SPREAD2, m_ctrlSpread2);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CTGCac, CFormView)
	//{{AFX_MSG_MAP(CTGCac)
	ON_WM_CREATE()
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTGCac diagnostics

#ifdef _DEBUG
void CTGCac::AssertValid() const
{
	CFormView::AssertValid();
}

void CTGCac::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CTGCac message handlers

int CTGCac::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CFormView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here
	GetParentFrame()->SetWindowText(_T("计算结果"));
	
	return 0;
}


void CTGCac::OnInitialUpdate() 
{
	CFormView::OnInitialUpdate();
	
	// TODO: Add your specialized code here and/or call the base class
	m_pTGData = &(((CMainFrame*)AfxGetMainWnd())->m_TGData);
	
	// TODO: Add your specialized code here and/or call the base class
	int		i, j;
	for(i = 0; i<8; i++)
	{
		m_ctrlSpread2.SetRow(i+1);
		for(j = 0; j<2; j++)
		{
			m_ctrlSpread2.SetCol(j+1);
			m_ctrlSpread2.SetText(m_pTGData->m_grid1[i][j]);
		}
		for(j = 4; j<7; j++)
		{
			m_ctrlSpread2.SetCol(j-1);
			m_ctrlSpread2.SetText(m_pTGData->m_grid1[i][j]);
		}
	}

//	UpdateData(false);
	
}

void CTGCac::OnSize(UINT nType, int cx, int cy) 
{
	CFormView::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	
	if(m_ctrlSpread2.m_hWnd != NULL)
	{
		CRect rc;	
		GetClientRect(&rc);
		m_ctrlSpread2.SetWindowPos(NULL, rc.left, rc.top, rc.Width(), rc.Height(), NULL);
	}
	
}

⌨️ 快捷键说明

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