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

📄

📁 用于电力系统的潮流计算程序 请让我下载我所需要的吧
💻
字号:
// 潮流计算(牛顿—拉夫逊法)View.cpp : implementation of the CMyView class
//

#include "stdafx.h"
#include "潮流计算(牛顿—拉夫逊法).h"

#include "潮流计算(牛顿—拉夫逊法)Doc.h"
#include "潮流计算(牛顿—拉夫逊法)View.h"
#include "PROPSHEET.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyView

IMPLEMENT_DYNCREATE(CMyView, CView)

BEGIN_MESSAGE_MAP(CMyView, CView)
	//{{AFX_MSG_MAP(CMyView)
	ON_COMMAND(ID_FUN_PROP, OnFunProp)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyView construction/destruction

CMyView::CMyView()
{
	// TODO: add construction code here

}

CMyView::~CMyView()
{
}

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

/////////////////////////////////////////////////////////////////////////////
// CMyView drawing

void CMyView::OnDraw(CDC* pDC)
{
	CMyDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
	pDC->TextOut (20,20,"result0:",m_result0);
	if(m_sel0)
		pDC->TextOut (20,40,"You check it!");
	else
		pDC->TextOut (20,40,"You uncheck it!");
}

/////////////////////////////////////////////////////////////////////////////
// CMyView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CMyView message handlers

void CMyView::OnFunProp() 
{
	// TODO: Add your command handler code here
	PROPSHEET myProperty("潮流计算",this,0);
	if (myProperty.DoModal ()==IDOK)
	{
		/*m_parameter0="what u have input is:";
		m_parameter0+=myProperty.m_pagesel .m_parameter0 ;*/
	    m_result0=func0(myProperty.m_pagesel .m_parameter0);
		m_sel0=myProperty.m_pagesel .m_sel0 ;
		Invalidate();
	}
}
int CMyView::func0 (int a)
{
	int b=12+a;
	return b;
}

⌨️ 快捷键说明

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