childview.cpp
来自「静磁波频率特性演示软件源代码 演示主要演示静磁波的频率特性 该软件现在还在一」· C++ 代码 · 共 79 行
CPP
79 行
// ChildView.cpp : implementation of the CChildView class
//
#include "stdafx.h"
#include "cp.h"
#include "ChildView.h"
#include "em.h"
#include "input.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChildView
CChildView::CChildView()
{
// em physic;
// pphysic=&physic;
// Input input;
// pinput=&input;
}
CChildView::~CChildView()
{
}
BEGIN_MESSAGE_MAP(CChildView,CWnd )
//{{AFX_MSG_MAP(CChildView)
ON_WM_PAINT()
ON_COMMAND(ID_INPUT, OnInput)
ON_WM_RBUTTONUP()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChildView message handlers
BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)
{
if (!CWnd::PreCreateWindow(cs))
return FALSE;
cs.dwExStyle |= WS_EX_CLIENTEDGE;
cs.style &= ~WS_BORDER;
cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS,
::LoadCursor(NULL, IDC_ARROW), HBRUSH(COLOR_WINDOW+1), NULL);
return TRUE;
}
void CChildView::OnPaint()
{
CPaintDC dc(this); // device context for painting
//input.DoModal();
physic.draw(&dc,&input);
// TODO: Add your message handler code here
// Do not call CWnd::OnPaint() for painting messages
}
void CChildView::OnInput()
{
// TODO: Add your command handler code here
if (input.DoModal()==IDOK)Invalidate();
}
void CChildView::OnRButtonUp(UINT nFlags, CPoint point)
{
if(input.DoModal()==IDOK)Invalidate();
CWnd ::OnRButtonDown(nFlags, point);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?