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

📄 set5frm.cpp

📁 一套故障诊断监测系统
💻 CPP
字号:
// Set5Frm.cpp : implementation of the CSet5Frame class
//

#include "stdafx.h"
#include "CDMS.h"

#include "Set5Frm.h"
#include "Set5View.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSet5Frame

IMPLEMENT_DYNCREATE(CSet5Frame, CMDIChildWnd)

BEGIN_MESSAGE_MAP(CSet5Frame, CMDIChildWnd)
	//{{AFX_MSG_MAP(CSet5Frame)
	ON_WM_CREATE()
//	ON_WM_MDIACTIVATE()
	ON_WM_DESTROY()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSet5Frame construction/destruction

CSet5Frame::CSet5Frame()
{
	// TODO: add member initialization code here
	
}

CSet5Frame::~CSet5Frame()
{
//		m_pMainFrame->IsSet5FrameCreated = FALSE;
}

BOOL CSet5Frame::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs
	cs.style &= ~FWS_ADDTOTITLE;
	if( !CMDIChildWnd::PreCreateWindow(cs) )
		return FALSE;

//	cs.style = WS_CHILD | WS_VISIBLE | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MAXIMIZE
//		| FWS_ADDTOTITLE;

	return TRUE;
}
/*
void CSet5Frame::ActivateFrame(int nCmdShow)
{
	// TODO: Modify this function to change how the frame is activated.
	nCmdShow = SW_SHOWMAXIMIZED;
	CMDIChildWnd::ActivateFrame(nCmdShow);
}
*/

/////////////////////////////////////////////////////////////////////////////
// CSet5Frame diagnostics

#ifdef _DEBUG
void CSet5Frame::AssertValid() const
{
	CMDIChildWnd::AssertValid();
}

void CSet5Frame::Dump(CDumpContext& dc) const
{
	CMDIChildWnd::Dump(dc);
}

#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CSet5Frame message handlers

int CSet5Frame::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO: Add your specialized creation code here

	//<-------------设置窗口标题------------->
	this->SetWindowText("5#机组");
	//<-------------设置窗口标题------------->
	
	return 0;
}
/*
void CSet5Frame::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd) 
{
	CMDIChildWnd::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd);
	
	// TODO: Add your message handler code here
	if(bActivate)
	{
		m_pMainFrame->SetCurActiveFrame(FRAME_TYPE_SET5);//数据管理子框架类型代码
	}	
}

void CSet5Frame::OnDestroy() 
{
	CMDIChildWnd::OnDestroy();
	
	// TODO: Add your message handler code here
	m_pMainFrame->m_hChildFrameSet5 = FALSE;	
}

BOOL CSet5Frame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
	// TODO: Add your specialized code here and/or call the base class

	//<-------------获取主框架指针------------->
	m_pMainFrame = (CMainFrame*)AfxGetMainWnd();
	if(m_pMainFrame == NULL)
		return FALSE;
	//<-------------获取主框架指针------------->

	m_pMainFrame->m_hChildFrameSet5 = this->m_hWnd;

	BOOL bSuccess = FALSE;
	bSuccess = CMDIChildWnd::OnCreateClient(lpcs, pContext);
	CSet5View* pWnd = (CSet5View*)this->GetWindow(GW_CHILD);

		//保存视图句柄
//		m_hWndSet5View = pWnd->m_hWnd;
		//设置视图编号、视图名称
//		pWnd->SetVeiwParentHandle(this->m_hWnd);

	//<-------------生成示波视图------------->	
	return bSuccess;
}

LRESULT CSet5Frame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	switch(message)
	{
	case UM_ACTIVATE_FRAME5:
		this->ActivateFrame();
		break;

	}
	
	return CMDIChildWnd::WindowProc(message, wParam, lParam);
}
*/

⌨️ 快捷键说明

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